Commit b64e3dd9 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

argyllcms: 3.0.0 -> 3.0.2

While at it added trivial updater script.

Changes: https://www.argyllcms.com/doc/ChangesSummary.html
parent 6b4e4578
Loading
Loading
Loading
Loading
+19 −3
Original line number Diff line number Diff line
{ 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,6 +122,20 @@ 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";
    description = "Color management system (compatible with ICC)";