perceptualdiff: fix darwin support (#121646)

This commit is contained in:
Uri Baghin 2021-05-06 12:36:08 +10:00 committed by GitHub
parent 1374bfa2d3
commit a4026fb952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 6 deletions

View File

@ -1,6 +1,7 @@
{ lib, stdenv, fetchsvn, darwin, libtiff
, libpng, zlib, libwebp, libraw, openexr, openjpeg
, libjpeg, jxrlib, pkg-config }:
, libjpeg, jxrlib, pkg-config
, fixDarwinDylibNames }:
stdenv.mkDerivation {
pname = "freeimage";
@ -17,7 +18,12 @@ stdenv.mkDerivation {
prePatch = "rm -rf Source/Lib* Source/OpenEXR Source/ZLib";
patches = [ ./unbundle.diff ];
nativeBuildInputs = [ pkg-config ] ++ lib.optional stdenv.isDarwin darwin.cctools;
nativeBuildInputs = [
pkg-config
] ++ lib.optionals stdenv.isDarwin [
darwin.cctools
fixDarwinDylibNames
];
buildInputs = [ libtiff libtiff.dev_private libpng zlib libwebp libraw openexr openjpeg libjpeg libjpeg.dev_private jxrlib ];
postBuild = lib.optionalString (!stdenv.isDarwin) ''

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, python3 }:
{ lib, stdenv, fetchFromGitHub, python3, fixDarwinDylibNames }:
stdenv.mkDerivation rec {
pname = "jxrlib";
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
--replace '.so' '.dylib'
'';
nativeBuildInputs = [ python3 ];
nativeBuildInputs = [ python3 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
strictDeps = true;

View File

@ -1,6 +1,5 @@
{ lib
, stdenv
, buildPackages
, fetchFromGitHub
, zlib
, ilmbase

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "A program that compares two images using a perceptually based image metric";
homepage = "https://github.com/myint/perceptualdiff";
license = licenses.gpl2;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ uri-canva ];
platforms = platforms.x86;
};