1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/development/libraries/openjpeg/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2013-08-31 16:05:11 +01:00
{ stdenv, fetchurl, pkgconfig, libpng, libtiff, lcms, cmake, glib/*passthru only*/ }:
stdenv.mkDerivation rec {
2013-08-31 16:05:11 +01:00
name = "openjpeg-2.0.0";
passthru = {
2013-08-31 16:05:11 +01:00
incDir = "openjpeg-2.0";
};
src = fetchurl {
url = "http://openjpeg.googlecode.com/files/${name}.tar.gz";
2013-08-31 16:05:11 +01:00
sha1 = "0af78ab2283b43421458f80373422d8029a9f7a7";
};
2013-08-31 16:05:11 +01:00
buildInputs = [ cmake ];
nativebuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ libpng libtiff lcms ]; # in closure anyway
2014-05-17 13:15:19 +01:00
postInstall = glib.flattenInclude + ''
mkdir -p "$out/lib/pkgconfig"
cat >"$out/lib/pkgconfig/libopenjp2.pc" <<EOF
prefix=$out
libdir=$out/lib
includedir=$out/include
Name: openjp2
Description: JPEG2000 library (Part 1 and 2)
URL: http://www.openjpeg.org/
Version: @OPENJPEG_VERSION@
Libs: -L$out/lib -lopenjp2
Cflags: -I$out/include
EOF
'';
2013-02-12 20:41:09 +00:00
meta = {
homepage = http://www.openjpeg.org/;
description = "Open-source JPEG 2000 codec written in C language";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.all;
};
}