diff options
Diffstat (limited to 'pkgs/development/libraries/jxrlib')
-rw-r--r-- | pkgs/development/libraries/jxrlib/default.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/development/libraries/jxrlib/default.nix b/pkgs/development/libraries/jxrlib/default.nix index e119c75ff8d..06499e151ba 100644 --- a/pkgs/development/libraries/jxrlib/default.nix +++ b/pkgs/development/libraries/jxrlib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, python }: +{ lib, stdenv, fetchFromGitHub, python3, fixDarwinDylibNames }: stdenv.mkDerivation rec { pname = "jxrlib"; @@ -13,15 +13,26 @@ stdenv.mkDerivation rec { sha256 = "0rk3hbh00nw0wgbfbqk1szrlfg3yq7w6ar16napww3nrlm9cj65w"; }; - nativeBuildInputs = [ python ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "cc" "$CC" + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile \ + --replace '-shared' '-dynamiclib -undefined dynamic_lookup' \ + --replace '.so' '.dylib' + ''; + + nativeBuildInputs = [ python3 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + + strictDeps = true; makeFlags = [ "DIR_INSTALL=$(out)" "SHARED=1" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Implementation of the JPEG XR image codec standard"; homepage = "https://jxrlib.codeplex.com"; license = licenses.bsd2; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ romildo ]; }; } |