From d4bb486c8df40b44acf6909c0a7ce9f875c1d933 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 30 Jan 2024 23:24:34 -0300 Subject: [PATCH] krita-plugin-gmic: init at 3.2.4.1 --- pkgs/applications/graphics/krita/wrapper.nix | 6 ++- pkgs/by-name/kr/krita-plugin-gmic/package.nix | 51 +++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/kr/krita-plugin-gmic/package.nix diff --git a/pkgs/applications/graphics/krita/wrapper.nix b/pkgs/applications/graphics/krita/wrapper.nix index ff6158e23e1a..6d62412e5662 100644 --- a/pkgs/applications/graphics/krita/wrapper.nix +++ b/pkgs/applications/graphics/krita/wrapper.nix @@ -2,7 +2,11 @@ , libsForQt5 , symlinkJoin , unwrapped ? libsForQt5.callPackage ./. { } -, binaryPlugins ? [ ] +, krita-plugin-gmic +, binaryPlugins ? [ + # Default plugins provided by upstream appimage + krita-plugin-gmic + ] }: symlinkJoin { diff --git a/pkgs/by-name/kr/krita-plugin-gmic/package.nix b/pkgs/by-name/kr/krita-plugin-gmic/package.nix new file mode 100644 index 000000000000..4cd46efd083a --- /dev/null +++ b/pkgs/by-name/kr/krita-plugin-gmic/package.nix @@ -0,0 +1,51 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, extra-cmake-modules +, fftw +, krita +, libsForQt5 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "krita-plugin-gmic"; + version = "3.2.4.1"; + + src = fetchFromGitHub { + owner = "amyspark"; + repo = "gmic"; + rev = "v${finalAttrs.version}"; + hash = "sha256-SYE8kGvN7iD5OqiEEZpB/eRle67PrB5DojMC79qAQtg="; + }; + sourceRoot = "${finalAttrs.src.name}/gmic-qt"; + dontWrapQtApps = true; + + postPatch = '' + patchShebangs \ + translations/filters/csv2ts.sh \ + translations/lrelease.sh + ''; + + nativeBuildInputs = [ cmake extra-cmake-modules ]; + + buildInputs = [ + fftw + krita.unwrapped + libsForQt5.kcoreaddons + libsForQt5.qttools + ]; + + cmakeFlags = [ + (lib.cmakeFeature "GMIC_QT_HOST" "krita-plugin") + # build krita's gmic instead of using the one from nixpkgs + (lib.cmakeBool "ENABLE_SYSTEM_GMIC" false) + ]; + + meta = with lib; { + homepage = "https://github.com/amyspark/gmic"; + description = "GMic plugin for Krita"; + license = lib.licenses.cecill21; + maintainers = with maintainers; [ lelgenio ]; + }; +})