diff options
Diffstat (limited to 'pkgs/applications/editors/poke/default.nix')
-rw-r--r-- | pkgs/applications/editors/poke/default.nix | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/applications/editors/poke/default.nix b/pkgs/applications/editors/poke/default.nix index cdfacaf92ede6..e050086139109 100644 --- a/pkgs/applications/editors/poke/default.nix +++ b/pkgs/applications/editors/poke/default.nix @@ -13,17 +13,20 @@ , nbdSupport ? !stdenv.isDarwin, libnbd , textStylingSupport ? true , dejagnu + +# update script only +, writeScript }: let isCross = stdenv.hostPlatform != stdenv.buildPlatform; in stdenv.mkDerivation rec { pname = "poke"; - version = "1.4"; + version = "2.1"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; - sha256 = "sha256-zgVN8pVgySEjATJwPuRJ/hMLbiWrA6psx5a7QBUGqiQ="; + sha256 = "sha256-zVKObBu8VAw7YpwrTza3hLMKAmsAWji5koNCJZlEJnA="; }; outputs = [ "out" "dev" "info" "lib" "man" ]; @@ -65,6 +68,20 @@ in stdenv.mkDerivation rec { moveToOutput share/emacs "$out" ''; + passthru = { + updateScript = writeScript "update-poke" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre common-updater-scripts + + set -eu -o pipefail + + # Expect the text in format of '<a href="...">poke 2.0</a>' + new_version="$(curl -s https://www.jemarch.net/poke | + pcregrep -o1 '>poke ([0-9.]+)</a>')" + update-source-version ${pname} "$new_version" + ''; + }; + meta = with lib; { description = "Interactive, extensible editor for binary data"; homepage = "http://www.jemarch.net/poke"; |