2019-10-31 22:02:34 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, libjpeg }:
|
2009-10-11 17:52:14 +02:00
|
|
|
|
2015-12-19 00:29:32 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "jhead";
|
2020-06-19 21:32:59 +02:00
|
|
|
version = "3.04";
|
2009-10-11 17:52:14 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "http://www.sentex.net/~mwandel/jhead/${pname}-${version}.tar.gz";
|
2020-06-19 21:32:59 +02:00
|
|
|
sha256 = "1j831bqw1qpkbchdriwcy3sgzvbagaj45wlc124fs9bc9z7vp2gg";
|
2009-10-11 17:52:14 +02:00
|
|
|
};
|
|
|
|
|
2019-10-31 22:02:34 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2020-06-19 21:32:59 +02:00
|
|
|
url = "https://sources.debian.org/data/main/j/jhead/1:3.04-2/debian/patches/01_gpsinfo.c";
|
|
|
|
sha256 = "0r8hdbfrdxip4dwz5wqsv47a29j33cx7w5zx4jdhp5l1ihg003lz";
|
2019-10-31 22:02:34 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-01-06 20:33:00 +01:00
|
|
|
buildInputs = [ libjpeg ];
|
|
|
|
|
2020-06-19 21:32:59 +02:00
|
|
|
makeFlags = [ "CPPFLAGS=" "CFLAGS=-O3" "LDFLAGS=" ];
|
2015-12-19 00:29:32 +01:00
|
|
|
|
2020-06-19 21:32:59 +02:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i '/dpkg-buildflags/d' makefile
|
2015-12-19 00:29:32 +01:00
|
|
|
substituteInPlace jhead.c \
|
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 \
|
2019-08-15 14:41:18 +02:00
|
|
|
$out/share/doc/${pname}-${version}
|
2015-12-19 00:29:32 +01:00
|
|
|
|
|
|
|
cp -v jhead $out/bin
|
|
|
|
cp -v jhead.1 $out/man/man1
|
2019-08-15 14:41:18 +02:00
|
|
|
cp -v *.txt $out/share/doc/${pname}-${version}
|
2009-10-11 17:52:14 +02:00
|
|
|
'';
|
|
|
|
|
2015-12-19 00:29:32 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.sentex.net/~mwandel/jhead/";
|
2009-10-11 17:52:14 +02:00
|
|
|
description = "Exif Jpeg header manipulation tool";
|
2015-12-19 00:29:32 +01:00
|
|
|
license = licenses.publicDomain;
|
2018-07-22 21:50:19 +02:00
|
|
|
maintainers = with maintainers; [ rycee ];
|
2015-12-19 00:29:32 +01:00
|
|
|
platforms = platforms.all;
|
2009-10-11 17:52:14 +02:00
|
|
|
};
|
|
|
|
}
|