3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/graphics/dcraw/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2021-01-15 09:19:50 +00:00
{lib, stdenv, fetchurl, libjpeg, lcms2, gettext, libiconv }:
stdenv.mkDerivation rec {
name = "dcraw-9.28.0";
src = fetchurl {
2019-11-17 21:55:36 +00:00
url = "https://www.dechifro.org/dcraw/archive/${name}.tar.gz";
sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418";
};
2021-01-15 09:19:50 +00:00
nativeBuildInputs = lib.optional stdenv.isDarwin libiconv;
buildInputs = [ libjpeg lcms2 gettext ];
# Jasper is disabled because the library is abandoned and has many
# CVEs.
patchPhase = ''
2018-08-11 19:09:50 +01:00
substituteInPlace install \
--replace 'prefix=/usr/local' 'prefix=$out' \
--replace gcc '$CC' \
--replace '-ljasper' '-DNO_JASPER=1'
'';
buildPhase = ''
mkdir -p $out/bin
2018-08-11 19:09:50 +01:00
sh -e install
'';
meta = {
homepage = "https://www.dechifro.org/dcraw/";
description = "Decoder for many camera raw picture formats";
2021-01-15 09:19:50 +00:00
license = lib.licenses.free;
platforms = lib.platforms.unix; # Once had cygwin problems
maintainers = [ ];
2019-11-17 21:55:36 +00:00
knownVulnerabilities = [
"CVE-2018-19655"
"CVE-2018-19565"
"CVE-2018-19566"
"CVE-2018-19567"
"CVE-2018-19568"
];
};
}