1{ lib
2, stdenv
3, fetchFromGitHub
4, autoreconfHook
5, lcms2
6, pkg-config
7
8# for passthru.tests
9, deepin
10, freeimage
11, hdrmerge
12, imagemagick
13, python3
14}:
15
16stdenv.mkDerivation rec {
17 pname = "libraw";
18 version = "0.21.2";
19
20 src = fetchFromGitHub {
21 owner = "LibRaw";
22 repo = "LibRaw";
23 rev = version;
24 hash = "sha256-p9CmOCulvV7+KKn1lXwpcysOo0+mD5UgPqy2ki0cIFE=";
25 };
26
27 outputs = [ "out" "lib" "dev" "doc" ];
28
29 propagatedBuildInputs = [ lcms2 ];
30
31 nativeBuildInputs = [ autoreconfHook pkg-config ];
32
33 enableParallelBuilding = true;
34
35 passthru.tests = {
36 inherit imagemagick hdrmerge freeimage;
37 inherit (deepin) deepin-image-viewer;
38 inherit (python3.pkgs) rawkit;
39 };
40
41 meta = with lib; {
42 description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)";
43 homepage = "https://www.libraw.org/";
44 license = with licenses; [ cddl lgpl2Plus ];
45 platforms = platforms.unix;
46 };
47}
48