Merge pull request #12187 from rycee/fix/jhead

jhead: add libjpeg as dependency
This commit is contained in:
Pascal Wittmann 2016-01-06 21:31:09 +01:00
commit 310869ea3b

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, libjpeg }:
stdenv.mkDerivation rec {
name = "jhead-${version}";
@ -9,12 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "0pl9s9ssb2a9di82f3ypin2hd098ns8kzdsxw3i2y94f07d03k48";
};
buildInputs = [ libjpeg ];
patchPhase = ''
substituteInPlace makefile \
--replace /usr/local/bin $out/bin
substituteInPlace jhead.c \
--replace "\" Compiled: \"__DATE__" ""
--replace "\" Compiled: \"__DATE__" "" \
--replace "jpegtran -trim" "${libjpeg}/bin/jpegtran -trim"
'';
installPhase = ''