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