Author: urkud
Date: Wed Feb  1 22:33:35 2012
New Revision: 31962
URL: https://nixos.org/websvn/nix/?rev=31962&sc=1

Log:
Merge two nix exprs for links2, upgrade to 2.5

Deleted:
   
nixpkgs/trunk/pkgs/applications/networking/browsers/links2/src-for-default.nix
   
nixpkgs/trunk/pkgs/applications/networking/browsers/links2/src-info-for-default.nix
   nixpkgs/trunk/pkgs/applications/networking/browsers/links2/stdenv.nix
Modified:
   nixpkgs/trunk/pkgs/applications/networking/browsers/links2/default.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Modified: nixpkgs/trunk/pkgs/applications/networking/browsers/links2/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/applications/networking/browsers/links2/default.nix      
Wed Feb  1 22:32:16 2012        (r31961)
+++ nixpkgs/trunk/pkgs/applications/networking/browsers/links2/default.nix      
Wed Feb  1 22:33:35 2012        (r31962)
@@ -1,33 +1,44 @@
-a :  
-let 
-  s = import ./src-for-default.nix;
-  buildInputs = with a; [
-    libpng libjpeg bzip2 zlib libtiff
-    libX11 libXau xproto gpm
-    openssl libXt pkgconfig
-  ];
-in
-rec {
-  src = a.fetchUrlFromSrcInfo s;
-
-  inherit (s) name;
-  inherit buildInputs;
-  configureFlags = [
-    "--enable-graphics"
-    "--with-ssl"
-    "--with-x"
-    "--with-fb"
-    ];
-
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doConfigure" "doMakeInstall"];
-      
+{ stdenv, fetchurl
+, gpm, openssl, pkgconfig # Misc.
+, libpng, libjpeg, libtiff # graphic formats
+, bzip2, zlib, xz # Transfer encodings
+, enableFB ? true
+, enableDirectFB ? false, directfb
+, enableX11 ? true, libX11, libXt, libXau # GUI support
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.5";
+  name = "links2-${version}";
+
+  src = fetchurl {
+    url = "${meta.homepage}/download/links-${version}.tar.bz2";
+    sha256 = "1wlmj8s6bxgznh0pnawihyvhffzryciz3lkagcxhf7fp64zz5izm";
+  };
+
+  buildInputs =
+    [ libpng libjpeg libtiff gpm openssl xz bzip2 zlib ]
+    ++ stdenv.lib.optionals enableX11 [ libX11 libXau libXt ]
+    ++ stdenv.lib.optional enableDirectFB [ directfb ];
+
+  buildNativeInputs = [ pkgconfig ];
+
+  configureFlags = [ "--with-ssl" ]
+    ++ stdenv.lib.optional (enableX11 || enableFB || enableDirectFB) 
"--enable-graphics"
+    ++ stdenv.lib.optional enableX11 "--with-x"
+    ++ stdenv.lib.optional enableFB "--with-fb"
+    ++ stdenv.lib.optional enableDirectFB "--with-directfb";
+
+  crossAttrs = {
+    preConfigure = ''
+      export CC=$crossConfig-gcc
+    '';
+  };
+
   meta = {
+    homepage = http://links.twibright.com/;
     description = "A small browser with some graphics support";
-    maintainers = [
-      a.lib.maintainers.raskin
-    ];
-    platforms = with a.lib.platforms; 
-      linux;
+    maintainers = with stdenv.lib.maintainers; [ raskin urkud viric ];
+    platforms = stdenv.lib.platforms.linux;
   };
 }

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed Feb  1 22:32:16 
2012        (r31961)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed Feb  1 22:33:35 
2012        (r31962)
@@ -7158,13 +7158,7 @@
   ledger = callPackage ../applications/office/ledger/2.6.3.nix { };
   ledger3 = callPackage ../applications/office/ledger/3.0.nix { };
 
-  links2 = (builderDefsPackage ../applications/networking/browsers/links2) {
-    inherit fetchurl stdenv bzip2 zlib libjpeg libpng libtiff
-      gpm openssl SDL SDL_image SDL_net pkgconfig;
-    inherit (xlibs) libX11 libXau xproto libXt;
-  };
-
-  links2Stdenv = callPackage 
../applications/networking/browsers/links2/stdenv.nix { };
+  links2 = callPackage ../applications/networking/browsers/links2 { };
 
   linphone = callPackage ../applications/networking/linphone {
     inherit (gnome) libglade gtk;
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to