about summary refs log tree commit diff
path: root/pkgs/tools/graphics/jhead/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics/jhead/default.nix')
-rw-r--r--pkgs/tools/graphics/jhead/default.nix35
1 files changed, 24 insertions, 11 deletions
diff --git a/pkgs/tools/graphics/jhead/default.nix b/pkgs/tools/graphics/jhead/default.nix
index ee44ff975bb3..470a2efdf6ba 100644
--- a/pkgs/tools/graphics/jhead/default.nix
+++ b/pkgs/tools/graphics/jhead/default.nix
@@ -1,25 +1,38 @@
-{stdenv, fetchurl}:
+{ stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "jhead-2.87";
+stdenv.mkDerivation rec {
+  name = "jhead-${version}";
+  version = "3.00";
 
   src = fetchurl {
-    url = http://www.sentex.net/~mwandel/jhead/jhead-2.87.tar.gz;
-    sha256 = "0vpp5jz49w5qzjzq3vllrbff7fr906jy8a8sq12yq8kw6qwbjjsl";
+    url = "http://www.sentex.net/~mwandel/jhead/${name}.tar.gz";
+    sha256 = "0pl9s9ssb2a9di82f3ypin2hd098ns8kzdsxw3i2y94f07d03k48";
   };
 
   patchPhase = ''
-    sed -i s@/usr/bin@$out/bin@ makefile
+    substituteInPlace makefile \
+      --replace /usr/local/bin $out/bin
+
+    substituteInPlace jhead.c \
+      --replace "\"   Compiled: \"__DATE__" ""
   '';
 
-  preInstall = ''
-    mkdir -p $out/bin
+  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}
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.sentex.net/~mwandel/jhead/;
     description = "Exif Jpeg header manipulation tool";
-    license = stdenv.lib.licenses.free;
-    maintainers = with stdenv.lib.maintainers; [viric];
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ viric rycee ];
+    platforms = platforms.all;
   };
 }