mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 11:05:14 +00:00
gmic-qt: fix build with 3.2.1
How the build was fixed: * Fetch tarball instead since that is what upstream supports to build gmic-qt from. * Set `sourceRoot` within tarball * Fetch patch from GreycLab/gmic#435 into gmic * Fetch patch from c-koi/gmic-qt#175 into gmic-qt
This commit is contained in:
parent
626a0ff9fa
commit
fd3e2b49f4
@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, variant ? "standalone"
|
||||
, fetchFromGitHub
|
||||
, fetchzip
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, pkg-config
|
||||
, ninja
|
||||
@ -16,7 +17,6 @@
|
||||
, curl
|
||||
, gimp ? null
|
||||
, gmic
|
||||
, cimg
|
||||
, qtbase
|
||||
, qttools
|
||||
, writeShellScript
|
||||
@ -54,13 +54,21 @@ mkDerivation rec {
|
||||
pname = "gmic-qt${lib.optionalString (variant != "standalone") "-${variant}"}";
|
||||
version = "3.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "c-koi";
|
||||
repo = "gmic-qt";
|
||||
rev = "v.${version}";
|
||||
sha256 = "sha256-z+GtYLBcHVufXwdeSd8WKmPmU1+/EKMv26kNaEgyt5w=";
|
||||
src = fetchzip {
|
||||
url = "https://gmic.eu/files/source/gmic_${version}.tar.gz";
|
||||
hash = "sha256-2lMnn19FcFKnfIjSxOObqxIjqLMUoWgi0ADZBCBePY4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "gmic-qt-3.2.1-fix-system-gmic.patch";
|
||||
url = "https://github.com/c-koi/gmic-qt/commit/e8d7a3523753ff592da63b1d54edf0921c54fe53.patch";
|
||||
hash = "sha256-kBFZo2qvod4pH3oK8gvnmw39x6eMH9zjr4mMcY74mFo=";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = "source/gmic-qt";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
@ -69,7 +77,6 @@ mkDerivation rec {
|
||||
|
||||
buildInputs = [
|
||||
gmic
|
||||
cimg
|
||||
qtbase
|
||||
qttools
|
||||
fftw
|
||||
@ -85,7 +92,8 @@ mkDerivation rec {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGMIC_QT_HOST=${if variant == "standalone" then "none" else variant}"
|
||||
"-DENABLE_SYSTEM_GMIC:BOOL=ON"
|
||||
"-DENABLE_SYSTEM_GMIC=ON"
|
||||
"-DENABLE_DYNAMIC_LINKING=ON"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -108,8 +116,6 @@ mkDerivation rec {
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
# Broken since 3.2.0 update, cannot handle system gmic and cimg.
|
||||
broken = true;
|
||||
description = variants.${variant}.description;
|
||||
homepage = "http://gmic.eu/";
|
||||
license = licenses.gpl3Plus;
|
||||
|
@ -15,7 +15,6 @@
|
||||
, libjpeg
|
||||
, libtiff
|
||||
, libpng
|
||||
, libX11
|
||||
, writeShellScript
|
||||
, common-updater-scripts
|
||||
, curl
|
||||
@ -42,8 +41,8 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "gmic-3.2.1-fix-system-gmic.patch";
|
||||
url = "https://github.com/GreycLab/gmic/commit/1fc184b40b7c31e7b100722d32cb9f7c5a79c90f.patch";
|
||||
hash = "sha256-xLlZ87QUiBrfioG7DNXf0HioxqOu6HX+57LW2FGdbLI=";
|
||||
url = "https://github.com/GreycLab/gmic/commit/9db3f6a39d9ed67b4279654da88993a8057575ff.patch";
|
||||
hash = "sha256-JznKCs56t6cJ4HLqlhMZjSOupEB8cdkn3j6RgZpcpzo=";
|
||||
})
|
||||
];
|
||||
|
||||
@ -68,7 +67,6 @@ stdenv.mkDerivation rec {
|
||||
libjpeg
|
||||
libtiff
|
||||
libpng
|
||||
libX11
|
||||
opencv
|
||||
openexr
|
||||
graphicsmagick
|
||||
|
Loading…
Reference in New Issue
Block a user