lol
1{ stdenv, fetchurl, libjpeg }:
2
3stdenv.mkDerivation rec {
4 name = "jhead-${version}";
5 version = "3.00";
6
7 src = fetchurl {
8 url = "http://www.sentex.net/~mwandel/jhead/${name}.tar.gz";
9 sha256 = "0pl9s9ssb2a9di82f3ypin2hd098ns8kzdsxw3i2y94f07d03k48";
10 };
11
12 buildInputs = [ libjpeg ];
13
14 patchPhase = ''
15 substituteInPlace makefile \
16 --replace /usr/local/bin $out/bin
17
18 substituteInPlace jhead.c \
19 --replace "\" Compiled: \"__DATE__" "" \
20 --replace "jpegtran -trim" "${libjpeg.bin}/bin/jpegtran -trim"
21 '';
22
23 installPhase = ''
24 mkdir -p \
25 $out/bin \
26 $out/man/man1 \
27 $out/share/doc/${name}
28
29 cp -v jhead $out/bin
30 cp -v jhead.1 $out/man/man1
31 cp -v *.txt $out/share/doc/${name}
32 '';
33
34 meta = with stdenv.lib; {
35 homepage = http://www.sentex.net/~mwandel/jhead/;
36 description = "Exif Jpeg header manipulation tool";
37 license = licenses.publicDomain;
38 maintainers = with maintainers; [ viric rycee ];
39 platforms = platforms.all;
40 };
41}