From 7c22e3af3003c66a936ea6d7ec385a39518eddf4 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 7 Sep 2019 12:20:15 +0200 Subject: gmic-qt-krita: rename from gmic_krita_qt --- pkgs/tools/graphics/gmic-qt/default.nix | 83 +++++++++++++++++++++++++++ pkgs/tools/graphics/gmic_krita_qt/default.nix | 83 --------------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 +- 4 files changed, 87 insertions(+), 84 deletions(-) create mode 100644 pkgs/tools/graphics/gmic-qt/default.nix delete mode 100644 pkgs/tools/graphics/gmic_krita_qt/default.nix diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix new file mode 100644 index 000000000000..e5bdf6f31775 --- /dev/null +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -0,0 +1,83 @@ +{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig +, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng +, curl, krita, qtbase, qttools +, fetchgit }: + +let + version = "2.3.6"; + +in stdenv.mkDerivation rec { + pname = "gmic_krita_qt"; + inherit version; + + gmic-community = fetchFromGitHub { + owner = "dtschump"; + repo = "gmic-community"; + rev = "3fd528f20a2a7d651e96078c205ff21efb9cdd1a"; + sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2"; + }; + + CImg = fetchgit { + url = "https://framagit.org/dtschump/CImg"; + rev = "90f5657d8eab7b549ef945103ef680e747385805"; + sha256 = "1af3dwqq18dkw0lz2gvnlw8y0kc1cw01hnc72rf3pg2wyjcp0pvc"; + }; + + gmic_stdlib = fetchurl { + name = "gmic_stdlib.h"; + # Version should e in sync with gmic. Basically the version string without dots + url = "http://gmic.eu/gmic_stdlib236.h"; + sha256 = "0q5g87dsn9byd2qqsa9xrsggfb9qv055s3l2gc0jrcvpx2qbza4q"; + }; + + gmic = fetchFromGitHub { + owner = "dtschump"; + repo = "gmic"; + rev = "v.${version}"; + sha256 = "1yg9ri3n07drv8gz4x0mn39ryi801ibl26jaza47m19ma893m8fi"; + }; + + gmic_qt = fetchFromGitHub { + owner = "c-koi"; + repo = "gmic-qt"; + rev = "v.${version}"; + sha256= "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3"; + }; + + unpackPhase = '' + cp -r ${gmic} gmic + ln -s ${gmic-community} gmic-community + cp -r ${gmic_qt} gmic_qt + chmod -R +w gmic gmic_qt + ln -s ${CImg} CImg + + cp ${gmic_stdlib} gmic/src/gmic_stdlib.h + + cd gmic_qt + ''; + + preConfigure = '' + make -C ../gmic/src CImg.h gmic_stdlib.h + ''; + + nativeBuildInputs = [ cmake pkgconfig ]; + + buildInputs = [ + qtbase qttools fftw zlib libjpeg libtiff libpng + opencv openexr graphicsmagick curl krita + ]; + + cmakeFlags = [ "-DGMIC_QT_HOST=krita" ]; + + installPhase = '' + mkdir -p $out/bin; + install -Dm755 gmic_krita_qt "$out/bin/gmic_krita_qt" + ''; + + meta = with stdenv.lib; { + description = "Krita plugin for the G'MIC image processing framework"; + homepage = http://gmic.eu/; + license = licenses.gpl3; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/graphics/gmic_krita_qt/default.nix b/pkgs/tools/graphics/gmic_krita_qt/default.nix deleted file mode 100644 index e5bdf6f31775..000000000000 --- a/pkgs/tools/graphics/gmic_krita_qt/default.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig -, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng -, curl, krita, qtbase, qttools -, fetchgit }: - -let - version = "2.3.6"; - -in stdenv.mkDerivation rec { - pname = "gmic_krita_qt"; - inherit version; - - gmic-community = fetchFromGitHub { - owner = "dtschump"; - repo = "gmic-community"; - rev = "3fd528f20a2a7d651e96078c205ff21efb9cdd1a"; - sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2"; - }; - - CImg = fetchgit { - url = "https://framagit.org/dtschump/CImg"; - rev = "90f5657d8eab7b549ef945103ef680e747385805"; - sha256 = "1af3dwqq18dkw0lz2gvnlw8y0kc1cw01hnc72rf3pg2wyjcp0pvc"; - }; - - gmic_stdlib = fetchurl { - name = "gmic_stdlib.h"; - # Version should e in sync with gmic. Basically the version string without dots - url = "http://gmic.eu/gmic_stdlib236.h"; - sha256 = "0q5g87dsn9byd2qqsa9xrsggfb9qv055s3l2gc0jrcvpx2qbza4q"; - }; - - gmic = fetchFromGitHub { - owner = "dtschump"; - repo = "gmic"; - rev = "v.${version}"; - sha256 = "1yg9ri3n07drv8gz4x0mn39ryi801ibl26jaza47m19ma893m8fi"; - }; - - gmic_qt = fetchFromGitHub { - owner = "c-koi"; - repo = "gmic-qt"; - rev = "v.${version}"; - sha256= "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3"; - }; - - unpackPhase = '' - cp -r ${gmic} gmic - ln -s ${gmic-community} gmic-community - cp -r ${gmic_qt} gmic_qt - chmod -R +w gmic gmic_qt - ln -s ${CImg} CImg - - cp ${gmic_stdlib} gmic/src/gmic_stdlib.h - - cd gmic_qt - ''; - - preConfigure = '' - make -C ../gmic/src CImg.h gmic_stdlib.h - ''; - - nativeBuildInputs = [ cmake pkgconfig ]; - - buildInputs = [ - qtbase qttools fftw zlib libjpeg libtiff libpng - opencv openexr graphicsmagick curl krita - ]; - - cmakeFlags = [ "-DGMIC_QT_HOST=krita" ]; - - installPhase = '' - mkdir -p $out/bin; - install -Dm755 gmic_krita_qt "$out/bin/gmic_krita_qt" - ''; - - meta = with stdenv.lib; { - description = "Krita plugin for the G'MIC image processing framework"; - homepage = http://gmic.eu/; - license = licenses.gpl3; - platforms = platforms.unix; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 046c6bc9acc3..4b243fabb3af 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -114,6 +114,7 @@ mapAliases ({ git-hub = gitAndTools.git-hub; # added 2016-04-29 glib_networking = glib-networking; # added 2018-02-25 gnome-mpv = celluloid; # added 2019-08-22 + gmic_krita_qt = gmic-qt-krita; # added 2019-09-07 gnome-themes-standard = gnome-themes-extra; # added 2018-03-14 gnome_doc_utils = gnome-doc-utils; # added 2018-02-25 gnome_themes_standard = gnome-themes-standard; # added 2018-02-25 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 793d1485bc14..68f8cc6d913a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1694,7 +1694,9 @@ in gmic = callPackage ../tools/graphics/gmic { }; - gmic_krita_qt = libsForQt5.callPackage ../tools/graphics/gmic_krita_qt { }; + gmic-qt = libsForQt5.callPackage ../tools/graphics/gmic-qt { }; + + gmic-qt-krita = gmic-qt; goa = callPackage ../development/tools/goa { }; -- cgit 1.4.1 From 8ad04d92f6be2254f58024842fbdbea7afd5e1c5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 7 Sep 2019 12:22:02 +0200 Subject: gmic-qt: format with nixpkgs-fmt --- pkgs/tools/graphics/gmic-qt/default.nix | 49 ++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index e5bdf6f31775..44e9243d91c3 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -1,11 +1,25 @@ -{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig -, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng -, curl, krita, qtbase, qttools -, fetchgit }: +{ stdenv +, fetchurl +, fetchFromGitHub +, cmake +, pkgconfig +, opencv +, openexr +, graphicsmagick +, fftw +, zlib +, libjpeg +, libtiff +, libpng +, curl +, krita +, qtbase +, qttools +, fetchgit +}: let version = "2.3.6"; - in stdenv.mkDerivation rec { pname = "gmic_krita_qt"; inherit version; @@ -41,7 +55,7 @@ in stdenv.mkDerivation rec { owner = "c-koi"; repo = "gmic-qt"; rev = "v.${version}"; - sha256= "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3"; + sha256 = "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3"; }; unpackPhase = '' @@ -60,14 +74,29 @@ in stdenv.mkDerivation rec { make -C ../gmic/src CImg.h gmic_stdlib.h ''; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ + cmake + pkgconfig + ]; buildInputs = [ - qtbase qttools fftw zlib libjpeg libtiff libpng - opencv openexr graphicsmagick curl krita + qtbase + qttools + fftw + zlib + libjpeg + libtiff + libpng + opencv + openexr + graphicsmagick + curl + krita ]; - cmakeFlags = [ "-DGMIC_QT_HOST=krita" ]; + cmakeFlags = [ + "-DGMIC_QT_HOST=krita" + ]; installPhase = '' mkdir -p $out/bin; -- cgit 1.4.1 From d8749430e43c05e3ee1602eb1a12d53362ae29e7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 7 Sep 2019 12:33:56 +0200 Subject: gmic-qt: allow building non-Krita hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use qt5’s mkDerivation * Also switch gimpPlugins.gmic to qmic-qt --- .../applications/graphics/gimp/plugins/default.nix | 4 +- pkgs/tools/graphics/gmic-qt/default.nix | 73 ++++++++++++++++++---- .../graphics/gmic-qt/fix-gimp-plugin-path.patch | 21 +++++++ pkgs/top-level/all-packages.nix | 4 +- 4 files changed, 87 insertions(+), 15 deletions(-) create mode 100644 pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 008bfdf881e5..2c520f21f848 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -152,7 +152,9 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { installPhase = "installPlugins src/gimp-lqr-plugin"; }; - gmic = pkgs.gmic.gimpPlugin; + gmic = pkgs.gmic-qt.override { + variant = "gimp"; + }; ufraw = pkgs.ufraw.gimpPlugin; diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index 44e9243d91c3..b8714e9b355e 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -1,5 +1,8 @@ -{ stdenv +{ lib +, mkDerivation , fetchurl +, fetchpatch +, variant ? "standalone" , fetchFromGitHub , cmake , pkgconfig @@ -12,17 +15,44 @@ , libtiff , libpng , curl -, krita +, krita ? null +, gimp ? null , qtbase , qttools , fetchgit }: let + variants = { + gimp = { + extraDeps = [ + gimp + gimp.gtk + ]; + description = "GIMP plugin for the G'MIC image processing framework"; + }; + + krita = { + extraDeps = [ + krita + ]; + description = "Krita plugin for the G'MIC image processing framework"; + }; + + standalone = { + description = "Versatile front-end to the image processing framework G'MIC"; + }; + }; + +in + +assert lib.assertMsg (builtins.hasAttr variant variants) "gmic-qt variant “${variant}” is not supported. Please use one of ${lib.concatStringsSep ", " (builtins.attrNames variants)}."; + +assert lib.assertMsg (builtins.all (d: d != null) variants.${variant}.extraDeps or []) "gmic-qt variant “${variant}” is missing one of its dependencies."; + +mkDerivation rec { + pname = "gmic-qt${lib.optionalString (variant != "standalone") ''-${variant}''}"; version = "2.3.6"; -in stdenv.mkDerivation rec { - pname = "gmic_krita_qt"; - inherit version; gmic-community = fetchFromGitHub { owner = "dtschump"; @@ -58,6 +88,24 @@ in stdenv.mkDerivation rec { sha256 = "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3"; }; + patches = [ + # Add install targets + (fetchpatch { + url = https://github.com/c-koi/gmic-qt/commit/ec4babbaf06a8711a4fd841f7de4106cda765109.patch; + sha256 = "1rim6vjx3k0yw8mplq8ampb2ykfabjj6d8vynmp8lm6n8id99yr0"; + }) + + # Fix translations installation + (fetchpatch { + url = https://github.com/c-koi/gmic-qt/commit/91f92ba589d6559541d5dfacf39dab4e0faaa106.patch; + sha256 = "1kh39349qcna386lx80kgj87xxlyh95xmwnv539z4zqnpzyqdxfs"; + }) + + # Install GIMP plug-in to a correct destination + # https://github.com/c-koi/gmic-qt/pull/78 + ./fix-gimp-plugin-path.patch + ]; + unpackPhase = '' cp -r ${gmic} gmic ln -s ${gmic-community} gmic-community @@ -91,20 +139,19 @@ in stdenv.mkDerivation rec { openexr graphicsmagick curl - krita - ]; + ] ++ variants.${variant}.extraDeps or []; cmakeFlags = [ - "-DGMIC_QT_HOST=krita" + "-DGMIC_QT_HOST=${if variant == "standalone" then "none" else variant}" ]; - installPhase = '' - mkdir -p $out/bin; - install -Dm755 gmic_krita_qt "$out/bin/gmic_krita_qt" + postFixup = lib.optionalString (variant == "gimp") '' + echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt" + wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt" ''; - meta = with stdenv.lib; { - description = "Krita plugin for the G'MIC image processing framework"; + meta = with lib; { + description = variants.${variant}.description; homepage = http://gmic.eu/; license = licenses.gpl3; platforms = platforms.unix; diff --git a/pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch b/pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch new file mode 100644 index 000000000000..ac0600fb76c3 --- /dev/null +++ b/pkgs/tools/graphics/gmic-qt/fix-gimp-plugin-path.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1483056..26d2b9a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -473,6 +473,7 @@ + + execute_process(COMMAND gimptool-2.0 --libs-noui OUTPUT_VARIABLE GIMP2_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND gimptool-2.0 --cflags-noui OUTPUT_VARIABLE GIMP2_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE) ++ execute_process(COMMAND pkg-config gimp-2.0 --define-variable=prefix=${CMAKE_INSTALL_PREFIX} --variable gimplibdir OUTPUT_VARIABLE GIMP2_PKGLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GIMP2_INCLUDE_DIRS}") + + set (gmic_qt_SRCS ${gmic_qt_SRCS} src/Host/Gimp/host_gimp.cpp) +@@ -484,7 +485,7 @@ + ${GIMP2_LIBRARIES} + ${gmic_qt_LIBRARIES} + ) +- install(TARGETS gmic_gimp_qt RUNTIME DESTINATION bin) ++ install(TARGETS gmic_gimp_qt RUNTIME DESTINATION "${GIMP2_PKGLIBDIR}/plug-ins") + + elseif (${GMIC_QT_HOST} STREQUAL "krita") + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68f8cc6d913a..57cf9ac5e23a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1696,7 +1696,9 @@ in gmic-qt = libsForQt5.callPackage ../tools/graphics/gmic-qt { }; - gmic-qt-krita = gmic-qt; + gmic-qt-krita = gmic-qt.override { + variant = "krita"; + }; goa = callPackage ../development/tools/goa { }; -- cgit 1.4.1 From ac757fbd420f3c748f20b348951fbe6a13088ced Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 7 Sep 2019 14:09:23 +0200 Subject: gmic: 2.2.2 → 2.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/graphics/gmic/default.nix | 63 ++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix index c487e42329d8..c6781310bdb5 100644 --- a/pkgs/tools/graphics/gmic/default.nix +++ b/pkgs/tools/graphics/gmic/default.nix @@ -1,46 +1,53 @@ -{ stdenv, fetchurl, cmake, ninja, pkgconfig -, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng -, withGimpPlugin ? true, gimp ? null}: - -assert withGimpPlugin -> gimp != null; - -let - version = "2.2.2"; - - # CMakeLists.txt is missing from the tarball and Makefile is terrible - CMakeLists = fetchurl { - url = "https://github.com/dtschump/gmic/raw/v.${version}/CMakeLists.txt"; - sha256 = "0lv5jrg98cpbk13fl4xm7l4sk1axfz054q570bpi741w815d7cpg"; - }; -in stdenv.mkDerivation { +{ stdenv +, fetchurl +, cmake +, ninja +, pkgconfig +, opencv +, openexr +, graphicsmagick +, fftw +, zlib +, libjpeg +, libtiff +, libpng +}: + +stdenv.mkDerivation rec { pname = "gmic"; - inherit version; + version = "2.7.1"; - outputs = [ "out" "lib" "dev" "man" ] ++ stdenv.lib.optional withGimpPlugin "gimpPlugin"; + outputs = [ "out" "lib" "dev" "man" ]; src = fetchurl { url = "https://gmic.eu/files/source/gmic_${version}.tar.gz"; - sha256 = "0zqfj2ym5nn3ff93xh2wf9ayxqlznabbdi00xw4lm7vw3iwkzqnc"; + sha256 = "1sxgmrxv1px07h5m7dcdg24c6x39ifjbc1fmz8p2ah91pm57h7n7"; }; - nativeBuildInputs = [ cmake ninja pkgconfig ]; + nativeBuildInputs = [ + cmake + ninja + pkgconfig + ]; buildInputs = [ - fftw zlib libjpeg libtiff libpng opencv openexr graphicsmagick - ] ++ stdenv.lib.optionals withGimpPlugin [ gimp gimp.gtk ]; + fftw + zlib + libjpeg + libtiff + libpng + opencv + openexr + graphicsmagick + ]; cmakeFlags = [ "-DBUILD_LIB_STATIC=OFF" - "-DBUILD_PLUGIN=${if withGimpPlugin then "ON" else "OFF"}" "-DENABLE_DYNAMIC_LINKING=ON" - ] ++ stdenv.lib.optional withGimpPlugin "-DPLUGIN_INSTALL_PREFIX=${placeholder "gimpPlugin"}/${gimp.targetPluginDir}"; - - postPatch = '' - cp ${CMakeLists} CMakeLists.txt - ''; + ]; meta = with stdenv.lib; { - description = "G'MIC is an open and full-featured framework for image processing"; + description = "Open and full-featured framework for image processing"; homepage = http://gmic.eu/; license = licenses.cecill20; platforms = platforms.unix; -- cgit 1.4.1 From 01e7149af6aeefb149d3e38777438242a31d5b09 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 7 Sep 2019 15:59:34 +0200 Subject: cimg: 2.7.0 → 2.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/cimg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/cimg/default.nix b/pkgs/development/libraries/cimg/default.nix index 3e7ef6d96eec..6181122aa7f1 100644 --- a/pkgs/development/libraries/cimg/default.nix +++ b/pkgs/development/libraries/cimg/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "cimg"; - version = "2.7.0"; + version = "2.7.1"; src = fetchurl { url = "http://cimg.eu/files/CImg_${version}.zip"; - sha256 = "1la6332cppyciyn3pflbchxa3av72a70p0n1c9sm1hgfbjlydqnv"; + sha256 = "1lw1hjk65zyd5x9w113yrqyy8db45jdzzkqslkipaiskl9f81y9z"; }; nativeBuildInputs = [ unzip ]; -- cgit 1.4.1 From 7a0f2fc3a02b6b89dbfa990c7b9908e34be62cc3 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 7 Sep 2019 16:53:01 +0200 Subject: gmic-qt: 2.3.6 → 2.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/graphics/gmic-qt/default.nix | 39 ++++++++++----------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index b8714e9b355e..cb0862c63736 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -4,6 +4,7 @@ , fetchpatch , variant ? "standalone" , fetchFromGitHub +, fetchFromGitLab , cmake , pkgconfig , opencv @@ -19,7 +20,6 @@ , gimp ? null , qtbase , qttools -, fetchgit }: let @@ -52,7 +52,7 @@ assert lib.assertMsg (builtins.all (d: d != null) variants.${variant}.extraDeps mkDerivation rec { pname = "gmic-qt${lib.optionalString (variant != "standalone") ''-${variant}''}"; - version = "2.3.6"; + version = "2.7.1"; gmic-community = fetchFromGitHub { owner = "dtschump"; @@ -61,46 +61,35 @@ mkDerivation rec { sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2"; }; - CImg = fetchgit { - url = "https://framagit.org/dtschump/CImg"; - rev = "90f5657d8eab7b549ef945103ef680e747385805"; - sha256 = "1af3dwqq18dkw0lz2gvnlw8y0kc1cw01hnc72rf3pg2wyjcp0pvc"; + CImg = fetchFromGitLab { + domain = "framagit.org"; + owner = "dtschump"; + repo = "CImg"; + rev = "v.${version}"; + sha256 = "1mfkjvf5r3ppc1dd6yvqn7xlhgzfg9k1k5v2sq2k9m70g8p7rgpd"; }; gmic_stdlib = fetchurl { name = "gmic_stdlib.h"; - # Version should e in sync with gmic. Basically the version string without dots - url = "http://gmic.eu/gmic_stdlib236.h"; - sha256 = "0q5g87dsn9byd2qqsa9xrsggfb9qv055s3l2gc0jrcvpx2qbza4q"; + url = "http://gmic.eu/gmic_stdlib${lib.replaceStrings ["."] [""] version}.h"; + sha256 = "0v12smknr1s44s6wq2gbnw0hb98xrwp6i3zg9wf49cl7s9qf76j3"; }; gmic = fetchFromGitHub { owner = "dtschump"; repo = "gmic"; rev = "v.${version}"; - sha256 = "1yg9ri3n07drv8gz4x0mn39ryi801ibl26jaza47m19ma893m8fi"; + sha256 = "0pa6kflr1gqgzh8rk7bylvkxs989r5jy0q7b62mnzx8895slwfb5"; }; gmic_qt = fetchFromGitHub { owner = "c-koi"; repo = "gmic-qt"; rev = "v.${version}"; - sha256 = "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3"; + sha256 = "08a0660083wv5fb1w9qqhm4f8cfwbqq723qzqq647mid1n7sy959"; }; patches = [ - # Add install targets - (fetchpatch { - url = https://github.com/c-koi/gmic-qt/commit/ec4babbaf06a8711a4fd841f7de4106cda765109.patch; - sha256 = "1rim6vjx3k0yw8mplq8ampb2ykfabjj6d8vynmp8lm6n8id99yr0"; - }) - - # Fix translations installation - (fetchpatch { - url = https://github.com/c-koi/gmic-qt/commit/91f92ba589d6559541d5dfacf39dab4e0faaa106.patch; - sha256 = "1kh39349qcna386lx80kgj87xxlyh95xmwnv539z4zqnpzyqdxfs"; - }) - # Install GIMP plug-in to a correct destination # https://github.com/c-koi/gmic-qt/pull/78 ./fix-gimp-plugin-path.patch @@ -118,10 +107,6 @@ mkDerivation rec { cd gmic_qt ''; - preConfigure = '' - make -C ../gmic/src CImg.h gmic_stdlib.h - ''; - nativeBuildInputs = [ cmake pkgconfig -- cgit 1.4.1