2021-01-15 09:19:50 +00:00
|
|
|
{lib, stdenv, fetchurl, libjpeg, lcms2, gettext, libiconv }:
|
2009-04-07 19:17:22 +00:00
|
|
|
|
2010-09-26 19:40:00 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-12 18:41:54 +00:00
|
|
|
pname = "dcraw";
|
|
|
|
version = "9.28.0";
|
2009-04-07 19:17:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 18:41:54 +00:00
|
|
|
url = "https://www.dechifro.org/dcraw/archive/dcraw-${version}.tar.gz";
|
2018-06-08 17:22:23 +00:00
|
|
|
sha256 = "1fdl3xa1fbm71xzc3760rsjkvf0x5jdjrvdzyg2l9ka24vdc7418";
|
2009-04-07 19:17:22 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin libiconv;
|
2020-03-14 08:30:31 +00:00
|
|
|
buildInputs = [ libjpeg lcms2 gettext ];
|
2009-04-07 19:17:22 +00:00
|
|
|
|
2020-03-14 08:30:31 +00:00
|
|
|
# Jasper is disabled because the library is abandoned and has many
|
|
|
|
# CVEs.
|
2009-04-07 19:17:22 +00:00
|
|
|
patchPhase = ''
|
2018-08-11 18:09:50 +00:00
|
|
|
substituteInPlace install \
|
|
|
|
--replace 'prefix=/usr/local' 'prefix=$out' \
|
2020-03-14 08:30:31 +00:00
|
|
|
--replace gcc '$CC' \
|
|
|
|
--replace '-ljasper' '-DNO_JASPER=1'
|
2009-04-07 19:17:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2018-08-11 18:09:50 +00:00
|
|
|
sh -e install
|
2009-04-07 19:17:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.dechifro.org/dcraw/";
|
2009-04-07 19:17:22 +00:00
|
|
|
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
|
2017-03-27 17:11:17 +00:00
|
|
|
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"
|
|
|
|
];
|
2009-04-07 19:17:22 +00:00
|
|
|
};
|
|
|
|
}
|