Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11-beta 57 lines 1.2 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, autoreconfHook 6, lcms2 7, pkg-config 8 9# for passthru.tests 10, deepin 11, freeimage 12, hdrmerge 13, imagemagick 14, python3 15}: 16 17stdenv.mkDerivation rec { 18 pname = "libraw"; 19 version = "0.21.1"; 20 21 src = fetchFromGitHub { 22 owner = "LibRaw"; 23 repo = "LibRaw"; 24 rev = version; 25 sha256 = "sha256-K9mULf6V/TCl5Vu4iuIdSGF9HzQlgNQLRFHIpNbmAlY"; 26 }; 27 28 patches = [ 29 (fetchpatch { 30 name = "CVE-2023-1729.patch"; 31 url = "https://github.com/LibRaw/LibRaw/commit/9ab70f6dca19229cb5caad7cc31af4e7501bac93.patch"; 32 hash = "sha256-OAyqphxvtSM15NI77HwtGTmTmP9YNu3xhZ6D1CceJ7I="; 33 }) 34 ]; 35 36 outputs = [ "out" "lib" "dev" "doc" ]; 37 38 propagatedBuildInputs = [ lcms2 ]; 39 40 nativeBuildInputs = [ autoreconfHook pkg-config ]; 41 42 enableParallelBuilding = true; 43 44 passthru.tests = { 45 inherit imagemagick hdrmerge freeimage; 46 inherit (deepin) deepin-image-viewer; 47 inherit (python3.pkgs) rawkit; 48 }; 49 50 meta = with lib; { 51 description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"; 52 homepage = "https://www.libraw.org/"; 53 license = with licenses; [ cddl lgpl2Plus ]; 54 platforms = platforms.unix; 55 }; 56} 57