nixpkgs-suyu/pkgs/tools/graphics/gmic_krita_qt/default.nix

83 lines
2.1 KiB
Nix
Raw Normal View History

2018-09-28 15:41:17 +02:00
{ stdenv, fetchurl, fetchFromGitHub, cmake, ninja, pkgconfig
2018-09-27 19:28:23 +02:00
, opencv, openexr, graphicsmagick, fftw, zlib, libjpeg, libtiff, libpng
2018-09-28 15:41:17 +02:00
, curl, krita, qtbase, qttools
2018-09-28 00:41:12 +02:00
, fetchgit }:
2018-09-27 19:28:23 +02:00
let
version = "2.3.6";
in stdenv.mkDerivation rec {
2018-09-28 15:41:17 +02:00
name = "gmic_krita_qt-${version}";
2018-09-27 19:28:23 +02:00
2018-09-27 22:41:26 +02:00
gmic-community = fetchFromGitHub {
owner = "dtschump";
repo = "gmic-community";
rev = "3fd528f20a2a7d651e96078c205ff21efb9cdd1a";
sha256 = "08d37b49qgh5d4rds7hvr5wjj4p1y8cnbidz1cyqsibq0555pwq2";
};
CImg = fetchgit {
url = "https://framagit.org/dtschump/CImg";
rev = "c523f0026f3b03831c0778335fe7c7661bf9a719";
sha256 = "13ja8immpjkm2xskddc920axq2rp4hc2sr5ghgvgy1rshc3lp8i8";
};
gmic_stdlib = fetchurl {
name = "gmic_stdlib.h";
2018-09-28 14:11:07 +02:00
# Version should e in sync with gmic. Basically the version string without dots
2018-09-27 22:41:26 +02:00
url = "http://gmic.eu/gmic_stdlib236.h";
sha256 = "0q5g87dsn9byd2qqsa9xrsggfb9qv055s3l2gc0jrcvpx2qbza4q";
};
2018-09-27 19:28:23 +02:00
2018-09-27 22:41:26 +02:00
gmic = fetchFromGitHub {
owner = "dtschump";
repo = "gmic";
2018-09-28 14:01:44 +02:00
rev = "v.${version}";
2018-09-27 22:41:26 +02:00
sha256 = "0f69r460lyfb021m7bs8s4rxa3png51cbp1izywsy3sprjd1s57p";
};
gmic_qt = fetchFromGitHub {
owner = "c-koi";
repo = "gmic-qt";
2018-09-28 14:01:44 +02:00
rev = "v.${version}";
2018-09-27 22:41:26 +02:00
sha256= "0j9wqlq67dwzir36yg58xy5lbblwizvgcvlmzcv9d6l901d5ayf3";
};
2018-09-27 19:28:23 +02:00
2018-09-27 22:41:26 +02:00
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
2018-09-27 19:28:23 +02:00
2018-09-28 13:53:21 +02:00
cp ${gmic_stdlib} gmic/src/gmic_stdlib.h
2018-09-28 13:40:46 +02:00
cd gmic_qt
'';
preConfigure = ''
2018-09-28 14:05:41 +02:00
make -C ../gmic/src CImg.h gmic_stdlib.h
2018-09-27 22:41:26 +02:00
'';
nativeBuildInputs = [ cmake pkgconfig ];
2018-09-27 19:28:23 +02:00
buildInputs = [
2018-09-28 15:41:17 +02:00
qtbase qttools fftw zlib libjpeg libtiff libpng
2018-09-28 00:41:12 +02:00
opencv openexr graphicsmagick curl krita
2018-09-27 20:34:40 +02:00
];
2018-09-27 19:28:23 +02:00
2018-09-27 23:48:43 +02:00
cmakeFlags = [ "-DGMIC_QT_HOST=krita" ];
2018-09-27 19:28:23 +02:00
installPhase = ''
mkdir -p $out/bin;
2018-09-28 00:41:12 +02:00
install -Dm755 gmic_krita_qt "$out/bin/gmic_krita_qt"
2018-09-27 19:28:23 +02:00
'';
meta = with stdenv.lib; {
description = "Krita plugin for the G'MIC image processing framework";
homepage = http://gmic.eu/;
license = licenses.gpl3;
platforms = platforms.unix;
};
}