about summary refs log tree commit diff
path: root/pkgs/by-name/kr/krita-plugin-gmic/package.nix
blob: 4cd46efd083a38e10e2ea36cde041e320abbfe34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 ];
  };
})