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 {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "dcraw";
|
|
|
|
version = "9.28.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "https://www.dechifro.org/dcraw/archive/dcraw-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418";
|
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.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"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|