diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-08-14 12:53:25 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-08-14 12:53:25 +0100 |
commit | 17c8b2e3a7fbb8be0a227931bbd817127288bbda (patch) | |
tree | 537e9a00a7e89ae78e55b38d6f050466a853bc93 /pkgs/tools/compression | |
parent | 5c37f7fa7e6571cbd86d690e8a662809b6f0df06 (diff) |
xz: 5.2.5 -> 5.2.6
While at it added trivial updater. Changes: https://git.tukaani.org/?p=xz.git;a=blob;f=NEWS;hb=v5.2.6
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r-- | pkgs/tools/compression/xz/default.nix | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index 75a58d011cef8..86df04c266919 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -1,5 +1,6 @@ { lib, stdenv, fetchurl , enableStatic ? stdenv.hostPlatform.isStatic +, writeScript }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -9,11 +10,11 @@ stdenv.mkDerivation rec { pname = "xz"; - version = "5.2.5"; + version = "5.2.6"; src = fetchurl { url = "https://tukaani.org/xz/xz-${version}.tar.bz2"; - sha256 = "1ps2i8i212n0f4xpq6clp7h13q7m1y8slqvxha9i8d0bj0qgj5si"; + sha256 = "E+NALjAbYBj2px7w5Jf3FMbRHiFK6C2rFWuBwqZKyyU="; }; strictDeps = true; @@ -34,6 +35,21 @@ stdenv.mkDerivation rec { postInstall = "rm -rf $out/share/doc"; + passthru = { + updateScript = writeScript "update-xz" '' + #!/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 '>xz-5.2.6.tar.bz2</a>' + # We pick first match where a stable release goes first. + new_version="$(curl -s https://tukaani.org/xz/ | + pcregrep -o1 '>xz-([0-9.]+)[.]tar[.]bz2</a>')" + update-source-version ${pname} "$new_version" + ''; + }; + meta = with lib; { homepage = "https://tukaani.org/xz/"; description = "A general-purpose data compression software, successor of LZMA"; |