2016-01-06 19:33:00 +00:00
|
|
|
{ stdenv, fetchurl, libjpeg }:
|
2009-10-11 15:52:14 +00:00
|
|
|
|
2015-12-18 23:29:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "jhead";
|
2019-01-03 18:13:34 +00:00
|
|
|
version = "3.03";
|
2009-10-11 15:52:14 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "http://www.sentex.net/~mwandel/jhead/${pname}-${version}.tar.gz";
|
2019-01-03 18:13:34 +00:00
|
|
|
sha256 = "1hn0yqcicq3qa20h1g313l1a671r8mccpb9gz0w1056r500lw6c2";
|
2009-10-11 15:52:14 +00:00
|
|
|
};
|
|
|
|
|
2016-01-06 19:33:00 +00:00
|
|
|
buildInputs = [ libjpeg ];
|
|
|
|
|
2009-10-11 15:52:14 +00: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 15:52:14 +00:00
|
|
|
'';
|
|
|
|
|
2015-12-18 23:29:32 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p \
|
|
|
|
$out/bin \
|
|
|
|
$out/man/man1 \
|
2019-08-15 12:41:18 +00:00
|
|
|
$out/share/doc/${pname}-${version}
|
2015-12-18 23:29:32 +00:00
|
|
|
|
|
|
|
cp -v jhead $out/bin
|
|
|
|
cp -v jhead.1 $out/man/man1
|
2019-08-15 12:41:18 +00:00
|
|
|
cp -v *.txt $out/share/doc/${pname}-${version}
|
2009-10-11 15:52:14 +00:00
|
|
|
'';
|
|
|
|
|
2015-12-18 23:29:32 +00:00
|
|
|
meta = with stdenv.lib; {
|
2009-10-11 15:52:14 +00: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;
|
2018-07-22 19:50:19 +00:00
|
|
|
maintainers = with maintainers; [ rycee ];
|
2015-12-18 23:29:32 +00:00
|
|
|
platforms = platforms.all;
|
2009-10-11 15:52:14 +00:00
|
|
|
};
|
|
|
|
}
|