2021-05-06 02:36:08 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, fixDarwinDylibNames }:
|
2018-11-11 20:01:54 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jxrlib";
|
|
|
|
version = "1.1";
|
|
|
|
|
|
|
|
# Use the source from a fork on github because CodePlex does not
|
|
|
|
# deliver an easily downloadable tarball.
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "4creators";
|
|
|
|
repo = pname;
|
|
|
|
rev = "f7521879862b9085318e814c6157490dd9dbbdb4";
|
|
|
|
sha256 = "0rk3hbh00nw0wgbfbqk1szrlfg3yq7w6ar16napww3nrlm9cj65w";
|
|
|
|
};
|
|
|
|
|
2021-07-08 17:10:05 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "cc" "$CC"
|
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
2020-08-16 22:34:37 +00:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-shared' '-dynamiclib -undefined dynamic_lookup' \
|
|
|
|
--replace '.so' '.dylib'
|
|
|
|
'';
|
|
|
|
|
2021-05-06 02:36:08 +00:00
|
|
|
nativeBuildInputs = [ python3 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
2021-03-25 09:26:46 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2018-11-11 20:01:54 +00:00
|
|
|
|
|
|
|
makeFlags = [ "DIR_INSTALL=$(out)" "SHARED=1" ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-11-11 20:01:54 +00:00
|
|
|
description = "Implementation of the JPEG XR image codec standard";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://jxrlib.codeplex.com";
|
2018-11-11 20:01:54 +00:00
|
|
|
license = licenses.bsd2;
|
2020-08-16 22:34:37 +00:00
|
|
|
platforms = platforms.unix;
|
2018-11-11 20:01:54 +00:00
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|