about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libraw
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libraw')
-rw-r--r--nixpkgs/pkgs/development/libraries/libraw/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libraw/default.nix b/nixpkgs/pkgs/development/libraries/libraw/default.nix
new file mode 100644
index 000000000000..69169c7e9af7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libraw/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, lcms2, pkgconfig
+, jasper ? null, withJpeg2k ? false
+# disable JPEG2000 support by default as jasper has many CVE
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libraw";
+  version = "0.19.5";
+
+  src = fetchurl {
+    url = "https://www.libraw.org/data/LibRaw-${version}.tar.gz";
+    sha256 = "1x827sh6vl8j3ll2ihkcr234y07f31hi1v7sl08jfw3irkbn58j0";
+  };
+
+  outputs = [ "out" "lib" "dev" "doc" ];
+
+  buildInputs = stdenv.lib.optionals withJpeg2k [ jasper ];
+
+  propagatedBuildInputs = [ lcms2 ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = {
+    description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)";
+    homepage = "https://www.libraw.org/";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
+