22 , variant ? "standalone"
32 description = "GIMP plugin for the G'MIC image processing framework";
36 extraDeps = []; # Just to keep uniformity and avoid test-for-null
37 description = "Versatile front-end to the image processing framework G'MIC";
44 (builtins.hasAttr variant variants)
45 "gmic-qt variant \"${variant}\" is not supported. Please use one of ${lib.concatStringsSep ", " (builtins.attrNames variants)}.";
48 (builtins.all (d: d != null) variants.${variant}.extraDeps)
49 "gmic-qt variant \"${variant}\" is missing one of its dependencies.";
51 stdenv.mkDerivation (finalAttrs: {
52 pname = "gmic-qt${lib.optionalString (variant != "standalone") "-${variant}"}";
55 src = fetchFromGitHub {
58 rev = "v.${finalAttrs.version}";
59 hash = "sha256-fM6dBxBC2b1/v+rfiP//QaAcTJmMtYPn4OUNwVqKhYk=";
64 libsForQt5.wrapQtAppsHook
80 ] ++ (with libsForQt5; [
83 ]) ++ lib.optionals stdenv.cc.isClang [
85 ] ++ variants.${variant}.extraDeps;
89 translations/filters/csv2ts.sh \
90 translations/lrelease.sh
93 ln -s ${gmic.src}/src/gmic.cpp ../src/gmic.cpp
97 (lib.cmakeBool "ENABLE_DYNAMIC_LINKING" true)
98 (lib.cmakeBool "ENABLE_SYSTEM_GMIC" true)
99 (lib.cmakeFeature "GMIC_QT_HOST" (if variant == "standalone" then "none" else variant))
102 postFixup = lib.optionalString (variant == "gimp") ''
103 echo "wrapping $out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt"
104 wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt/gmic_gimp_qt"
109 # They need to be update in lockstep.
110 gimp-plugin = gimpPlugins.gmic;
114 updateScript = nix-update-script {
115 extraArgs = [ "--version-regex" "^v\\.(.*)" ];
120 homepage = "http://gmic.eu/";
121 inherit (variants.${variant}) description;
122 license = lib.licenses.gpl3Plus;
123 mainProgram = "gmic_qt";
124 maintainers = with lib.maintainers; [ AndersonTorres ];
125 platforms = lib.platforms.unix;