2016-01-06 19:33:00 +00:00
|
|
|
{ stdenv, fetchurl, libjpeg }:
|
2009-10-11 16:52:14 +01:00
|
|
|
|
2015-12-18 23:29:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "jhead-${version}";
|
|
|
|
version = "3.00";
|
2009-10-11 16:52:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-12-18 23:29:32 +00:00
|
|
|
url = "http://www.sentex.net/~mwandel/jhead/${name}.tar.gz";
|
|
|
|
sha256 = "0pl9s9ssb2a9di82f3ypin2hd098ns8kzdsxw3i2y94f07d03k48";
|
2009-10-11 16:52:14 +01:00
|
|
|
};
|
|
|
|
|
2016-01-06 19:33:00 +00:00
|
|
|
buildInputs = [ libjpeg ];
|
|
|
|
|
2009-10-11 16:52:14 +01:00
|
|
|
patchPhase = ''
|
2015-12-18 23:29:32 +00:00
|
|
|
substituteInPlace makefile \
|
|
|
|
--replace /usr/local/bin $out/bin
|
|
|
|
|
|
|
|
substituteInPlace jhead.c \
|
2016-01-06 19:33:00 +00:00
|
|
|
--replace "\" Compiled: \"__DATE__" "" \
|
2016-02-01 18:46:10 +00:00
|
|
|
--replace "jpegtran -trim" "${libjpeg.bin}/bin/jpegtran -trim"
|
2009-10-11 16:52:14 +01:00
|
|
|
'';
|
|
|
|
|
2015-12-18 23:29:32 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p \
|
|
|
|
$out/bin \
|
|
|
|
$out/man/man1 \
|
|
|
|
$out/share/doc/${name}
|
|
|
|
|
|
|
|
cp -v jhead $out/bin
|
|
|
|
cp -v jhead.1 $out/man/man1
|
|
|
|
cp -v *.txt $out/share/doc/${name}
|
2009-10-11 16:52:14 +01:00
|
|
|
'';
|
|
|
|
|
2015-12-18 23:29:32 +00:00
|
|
|
meta = with stdenv.lib; {
|
2009-10-11 16:52:14 +01:00
|
|
|
homepage = http://www.sentex.net/~mwandel/jhead/;
|
|
|
|
description = "Exif Jpeg header manipulation tool";
|
2015-12-18 23:29:32 +00:00
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ viric rycee ];
|
|
|
|
platforms = platforms.all;
|
2009-10-11 16:52:14 +01:00
|
|
|
};
|
|
|
|
}
|