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

View file

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

View file

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

View file

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