From 6ea702f2a01e25ddec443736146b736d6aee9b69 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 17:52:40 +0100 Subject: [PATCH 1/8] cimg: Add gmic and gmic-qt to passthru.tests They often need to be updated in lockstep. --- pkgs/development/libraries/cimg/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/cimg/default.nix b/pkgs/development/libraries/cimg/default.nix index 566c427d46a6..941abaf0ba0b 100644 --- a/pkgs/development/libraries/cimg/default.nix +++ b/pkgs/development/libraries/cimg/default.nix @@ -1,6 +1,8 @@ { lib , stdenv , fetchFromGitHub +, gmic +, gmic-qt }: stdenv.mkDerivation rec { @@ -28,6 +30,11 @@ stdenv.mkDerivation rec { runHook postInstall ''; + passthru.tests = { + # Need to update in lockstep. + inherit gmic gmic-qt; + }; + meta = with lib; { homepage = "http://cimg.eu/"; description = "A small, open source, C++ toolkit for image processing"; From a07960652c65883166b7d6ad4da625ffcbea8484 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 17:49:22 +0100 Subject: [PATCH 2/8] gmic: Add gmic-qt to passthru.tests It often needs to be updated in lockstep. --- pkgs/tools/graphics/gmic/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix index 6e811e1aa3df..f9e5311b64d2 100644 --- a/pkgs/tools/graphics/gmic/default.nix +++ b/pkgs/tools/graphics/gmic/default.nix @@ -21,6 +21,7 @@ , gnused , coreutils , jq +, gmic-qt }: stdenv.mkDerivation rec { @@ -81,6 +82,11 @@ stdenv.mkDerivation rec { ''; passthru = { + tests = { + # Needs to update in lockstep. + inherit gmic-qt; + }; + updateScript = writeShellScript "${pname}-update-script" '' set -o errexit PATH=${lib.makeBinPath [ common-updater-scripts curl gnugrep gnused coreutils jq ]} From c4d80af5bd57db5c10a992ea8d7b6b4acdd557b3 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 17:58:15 +0100 Subject: [PATCH 3/8] gmic: fix update script It got broken by the 3.2.0 bump: https://github.com/NixOS/nixpkgs/commit/2dd0b25e164946e597c1f8a1309d73f1bff03f53 --- pkgs/tools/graphics/gmic/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix index f9e5311b64d2..c462bcb77980 100644 --- a/pkgs/tools/graphics/gmic/default.nix +++ b/pkgs/tools/graphics/gmic/default.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { for component in src gmic_stdlib; do # The script will not perform an update when the version attribute is up to date from previous platform run # We need to clear it before each run - update-source-version "--source-key=$component" "gmic" 0 "$(printf '0%.0s' {1..64})" + update-source-version "--source-key=$component" "gmic" 0 "${lib.fakeHash}" update-source-version "--source-key=$component" "gmic" $latestVersion done ''; From 8e9e60c483665fb523554dc2e9eeed34d1c2f8c3 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 17:00:10 +0000 Subject: [PATCH 4/8] =?UTF-8?q?gmic:=203.2.0=20=E2=86=92=203.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/graphics/gmic/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix index c462bcb77980..52499196bba4 100644 --- a/pkgs/tools/graphics/gmic/default.nix +++ b/pkgs/tools/graphics/gmic/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { pname = "gmic"; - version = "3.2.0"; + version = "3.2.1"; outputs = [ "out" "lib" "dev" "man" ]; @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { owner = "dtschump"; repo = "gmic"; rev = "v.${version}"; - hash = "sha256-lrIlzxXWqv046G5uRkBQnjvysaIcv+iDKxjuUEJWqcs="; + hash = "sha256-oEH4GlSV+642TGSJJhV4yzydh1hAQZfzwaiPAZFNQtI="; }; # TODO: build this from source @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { gmic_stdlib = fetchurl { name = "gmic_stdlib.h"; url = "http://gmic.eu/gmic_stdlib${lib.replaceStrings ["."] [""] version}.h"; - hash = "sha256-kWHzA1Dk7F4IROq/gk+RJllry3BABMbssJxhkQ6Cp2M="; + hash = "sha256-f8d9jTVnHwSoyMuiM+Qv86e/BYX9SSx9cl3borihxnc="; }; nativeBuildInputs = [ From 02be63faedcd2e6283ece368bb8d248c657aeb26 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 17:34:52 +0100 Subject: [PATCH 5/8] gmic-qt: add update script --- pkgs/tools/graphics/gmic-qt/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index f67021f38488..1611eb5de7b6 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -25,6 +25,7 @@ , gnused , coreutils , jq +, nix-update-script }: let @@ -97,6 +98,10 @@ mkDerivation rec { wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt" ''; + passthru = { + updateScript = nix-update-script { }; + }; + meta = with lib; { description = variants.${variant}.description; homepage = "http://gmic.eu/"; From 24f2c744c71b024adedea79421ef8ec5027dfb21 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 16:47:00 +0000 Subject: [PATCH 6/8] =?UTF-8?q?gmic-qt:=203.2.0=20=E2=86=92=203.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/c-koi/gmic-qt/compare/v.3.2.0...v.3.2.1 --- pkgs/tools/graphics/gmic-qt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index 1611eb5de7b6..098df04e545c 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -51,13 +51,13 @@ assert lib.assertMsg (builtins.all (d: d != null) variants.${variant}.extraDeps mkDerivation rec { pname = "gmic-qt${lib.optionalString (variant != "standalone") "-${variant}"}"; - version = "3.2.0"; + version = "3.2.1"; src = fetchFromGitHub { owner = "c-koi"; repo = "gmic-qt"; rev = "v.${version}"; - sha256 = "sha256-I5XC7zbDyBPFj4zul9rshoyeVV0hRQQ3aZQzEvYrgdc="; + sha256 = "sha256-z+GtYLBcHVufXwdeSd8WKmPmU1+/EKMv26kNaEgyt5w="; }; nativeBuildInputs = [ From e00fa961ed33e59510854b1c89c90d2fd62efcd4 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 17:48:56 +0100 Subject: [PATCH 7/8] gmic-qt: Add gimp plug-in to passthru.tests --- pkgs/tools/graphics/gmic-qt/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index 098df04e545c..dc73849d148e 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -26,6 +26,7 @@ , coreutils , jq , nix-update-script +, gimpPlugins }: let @@ -99,6 +100,10 @@ mkDerivation rec { ''; passthru = { + tests = { + gimp-plugin = gimpPlugins.gmic; + }; + updateScript = nix-update-script { }; }; From 63e4a922175abf5f7d5087225bc046b0177348f5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 19 Feb 2023 18:17:57 +0100 Subject: [PATCH 8/8] gmic-qt: Mark as broken MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ever since the gmic 3.2.0 bump, it just does not build – it tries to use stub definitions for gmic_image from src/GmicQt.h, leading to errors like: /build/source/src/GmicQt.cpp:344:11: error: 'struct gmic_library::gmic_image' has no member named 'channels' 344 | img.channels(0, 3); | ~~~~^~~~~~~~ gmic-qt 3.2.1 contains a supposed fix (https://github.com/c-koi/gmic-qt/commit/f0d9d8acd10b89f9d28a49227f3c70ff1f2e18a5) which might have actually fixed the gmic_image issue but it introduces another one with cimg. gmic-3.2.1-dev/include/gmic.h:191:21: fatal error: gmic.cpp: No such file or directory 191 | #define cimg_plugin "gmic.cpp" | ^~~~~~~~~~ I do not really understand qmake, deprecated build system which gmic author insists on using for gmic-qt, and the trio of libraries is convoluted enough (mutually including their various headers and source files) that I gave up on creating an usable CMake build script that supports system libraries. It does not help that the git history is obfuscated, making proper investigation annoying. Marking it as broken will at least make gimp-with-plugins work. --- pkgs/tools/graphics/gmic-qt/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index dc73849d148e..f9766650ec41 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -108,6 +108,8 @@ mkDerivation rec { }; meta = with lib; { + # Broken since 3.2.0 update, cannot handle system gmic and cimg. + broken = true; description = variants.${variant}.description; homepage = "http://gmic.eu/"; license = licenses.gpl3Plus;