summary refs log tree commit diff
path: root/pkgs/applications/graphics/fbida/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/fbida/default.nix')
-rw-r--r--pkgs/applications/graphics/fbida/default.nix49
1 files changed, 24 insertions, 25 deletions
diff --git a/pkgs/applications/graphics/fbida/default.nix b/pkgs/applications/graphics/fbida/default.nix
index f7482e0bfe75..ea7cb81a48e5 100644
--- a/pkgs/applications/graphics/fbida/default.nix
+++ b/pkgs/applications/graphics/fbida/default.nix
@@ -1,34 +1,33 @@
-a :  
-let 
-  fetchurl = a.fetchurl;
+{ stdenv, fetchurl, libjpeg, libexif, giflib, libtiff, libpng
+, pkgconfig, freetype, fontconfig
+}:
 
-  version = a.lib.attrByPath ["version"] "2.07" a; 
-  buildInputs = with a; [
-    libjpeg libexif giflib libtiff libpng
-      imagemagick ghostscript which curl 
-      pkgconfig freetype fontconfig
-  ];
-in
-rec {
+stdenv.mkDerivation rec {
+  name = "fbida-2.07";
+  
   src = fetchurl {
-    url = "http://dl.bytesex.org/releases/fbida/fbida-${version}.tar.gz";
+    url = "http://dl.bytesex.org/releases/fbida/${name}.tar.gz";
     sha256 = "0i6v3fvjc305pfw48sglb5f22lwxldmfch6mjhqbcp7lqkkxw435";
   };
 
-  inherit buildInputs;
-  configureFlags = [];
-  makeFlags = [
-    "prefix=$out"
-    "verbose=yes"
-    ];
+  preBuild =
+    ''
+      # Fetch a segfault in exiftran (http://bugs.gentoo.org/284753).
+      # `fbida' contains a copy of some internal libjpeg source files.
+      # If these do not match with the actual libjpeg, exiftran may
+      # fail.
+      tar xvf ${libjpeg.src}
+      for i in jpegint.h jpeglib.h jinclude.h transupp.c transupp.h; do
+        cp jpeg-*/$i jpeg/
+      done
+    '';
+
+  buildInputs =
+    [ pkgconfig libexif libjpeg giflib libpng giflib freetype fontconfig ];
+  
+  makeFlags = [ "prefix=$(out)" "verbose=yes" ];
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doMakeInstall" (a.doPatchShebangs "$out/bin")];
-      
-  name = "fbida-" + version;
   meta = {
-    description = "Framebuffer image viewing programs";
-    maintainers = [
-    ];
+    description = "Image viewing and manipulation programs";
   };
 }