diff --git a/pkgs/tools/graphics/argyllcms/default.nix b/pkgs/tools/graphics/argyllcms/default.nix index 1d40af7cba8b..271d5a5754f9 100644 --- a/pkgs/tools/graphics/argyllcms/default.nix +++ b/pkgs/tools/graphics/argyllcms/default.nix @@ -1,16 +1,18 @@ { stdenv, fetchzip, jam, unzip, libX11, libXxf86vm, libXrandr, libXinerama , libXrender, libXext, libtiff, libjpeg, libpng, libXScrnSaver, writeText -, libXdmcp, libXau, lib, openssl }: +, libXdmcp, libXau, lib, openssl +, writeScript +}: stdenv.mkDerivation rec { pname = "argyllcms"; - version = "3.0.0"; + version = "3.0.2"; src = fetchzip { # Kind of flacky URL, it was reaturning 406 and inconsistent binaries for a # while on me. It might be good to find a mirror url = "https://www.argyllcms.com/Argyll_V${version}_src.zip"; - sha256 = "sha256-nX7YwsbWqaHav22S91ZkfAXXxuFYANhAv5hTO696Dt0="; + hash = "sha256-9+rUhZVwSzAM9Ko6FYyl2OVvsOFBaUCA1PJs9kaLWaE="; }; nativeBuildInputs = [ jam unzip ]; @@ -120,8 +122,22 @@ stdenv.mkDerivation rec { ''; + passthru = { + updateScript = writeScript "update-argyllcms" '' + #!/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 'Current Version 3.0.1 (19th October 2023)' + new_version="$(curl -s https://www.argyllcms.com/ | + pcregrep -o1 '>Current Version ([0-9.]+) ')" + update-source-version ${pname} "$new_version" + ''; + }; + meta = with lib; { - homepage = "http://www.argyllcms.com"; + homepage = "https://www.argyllcms.com/"; description = "Color management system (compatible with ICC)"; license = licenses.gpl3; maintainers = [];