2016-01-06 20:33:00 +01:00
|
|
|
{ stdenv, fetchurl, libjpeg }:
|
2009-10-11 17:52:14 +02:00
|
|
|
|
2015-12-19 00:29:32 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "jhead-${version}";
|
|
|
|
version = "3.00";
|
2009-10-11 17:52:14 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-12-19 00:29:32 +01:00
|
|
|
url = "http://www.sentex.net/~mwandel/jhead/${name}.tar.gz";
|
|
|
|
sha256 = "0pl9s9ssb2a9di82f3ypin2hd098ns8kzdsxw3i2y94f07d03k48";
|
2009-10-11 17:52:14 +02:00
|
|
|
};
|
|
|
|
|
2016-01-06 20:33:00 +01:00
|
|
|
buildInputs = [ libjpeg ];
|
|
|
|
|
2009-10-11 17:52:14 +02:00
|
|
|
patchPhase = ''
|
2015-12-19 00:29:32 +01:00
|
|
|
substituteInPlace makefile \
|
|
|
|
--replace /usr/local/bin $out/bin
|
|
|
|
|
|
|
|
substituteInPlace jhead.c \
|
2016-01-06 20:33:00 +01:00
|
|
|
--replace "\" Compiled: \"__DATE__" "" \
|
2016-02-01 19:46:10 +01:00
|
|
|
--replace "jpegtran -trim" "${libjpeg.bin}/bin/jpegtran -trim"
|
2009-10-11 17:52:14 +02:00
|
|
|
'';
|
|
|
|
|
2015-12-19 00:29:32 +01: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 17:52:14 +02:00
|
|
|
'';
|
|
|
|
|
2015-12-19 00:29:32 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-10-11 17:52:14 +02:00
|
|
|
homepage = http://www.sentex.net/~mwandel/jhead/;
|
|
|
|
description = "Exif Jpeg header manipulation tool";
|
2015-12-19 00:29:32 +01:00
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ viric rycee ];
|
|
|
|
platforms = platforms.all;
|
2009-10-11 17:52:14 +02:00
|
|
|
};
|
|
|
|
}
|