Author: maggesi
Date: Thu Oct 13 12:37:15 2011
New Revision: 29819
URL: https://nixos.org/websvn/nix/?rev=29819&sc=1

Log:
Update OpenAFS client to version 1.6.0.  Also enable Hydra build.

Deleted:
   nixpkgs/trunk/pkgs/servers/openafs-client/replace-usrbinenv
   nixpkgs/trunk/pkgs/servers/openafs-client/replace-usrbinperl
   nixpkgs/trunk/pkgs/servers/openafs-client/replace-usrinclude
   nixpkgs/trunk/pkgs/servers/openafs-client/replace-usrsrc
Modified:
   nixpkgs/trunk/pkgs/lib/licenses.nix
   nixpkgs/trunk/pkgs/servers/openafs-client/default.nix

Modified: nixpkgs/trunk/pkgs/lib/licenses.nix
==============================================================================
--- nixpkgs/trunk/pkgs/lib/licenses.nix Thu Oct 13 11:34:02 2011        (r29818)
+++ nixpkgs/trunk/pkgs/lib/licenses.nix Thu Oct 13 12:37:15 2011        (r29819)
@@ -82,6 +82,12 @@
     url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
   };
 
+  ipl10 = {
+    shortName = "IPL 1.0";
+    fullName = "IBM Public License Version 1.0";
+    url = 
http://www.ibm.com/developerworks/opensource/library/os-i18n2/os-ipl.html;
+  };
+
   ijg = {
     shortName = "IJG";
     fullName = "Independent JPEG Group License";

Modified: nixpkgs/trunk/pkgs/servers/openafs-client/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/servers/openafs-client/default.nix       Thu Oct 13 
11:34:02 2011        (r29818)
+++ nixpkgs/trunk/pkgs/servers/openafs-client/default.nix       Thu Oct 13 
12:37:15 2011        (r29819)
@@ -1,63 +1,47 @@
-{ stdenv, fetchurl, autoconf, automake, flex, yacc,
+{ stdenv, fetchurl, which, autoconf, automake, flex, yacc,
   kernel, glibc, ncurses, perl, krb5 }:
 
 assert stdenv.isLinux;
 
-let
-  pname = "openafs";
-  version = "1.4.11";
-  name = "${pname}-${version}-${kernel.version}";
-  webpage = http://www.openafs.org;
-in
-
-stdenv.mkDerivation rec {
-  inherit name;
+stdenv.mkDerivation {
+  name = "openafs-1.6.0-${kernel.version}";
 
   src = fetchurl {
-    url = "${webpage}/dl/${pname}/${version}/${pname}-${version}-src.tar.gz";
-    sha256 = 
"ea5377119fd7b5317428644fa427066b9edbde395d997943a448426742d2c5c9";
+    url = http://www.openafs.org/dl/openafs/1.6.0/openafs-1.6.0-src.tar.bz2;
+    sha256 = "1rj40qp30hswr08p69jigya78ggbn4dc7qnnw2sfjpv52ywa68p7";
   };
 
-  buildInputs = [ autoconf automake flex yacc ncurses perl ];
-
-  replace_usrbinenv = ./replace-usrbinenv;
-  replace_usrinclude = ./replace-usrinclude;
-  replace_usrbinperl = ./replace-usrbinperl;
-  replace_usrsrc = ./replace-usrsrc;
+  buildInputs = [ autoconf automake flex yacc ncurses perl which ];
 
-  configurePhase = ''
+  preConfigure = ''
     ln -s ${kernel}/lib/modules/*/build $TMP/linux
 
-    echo "Replace ..."
-    for i in `cat ${replace_usrbinenv}`; do
-      substituteInPlace $i --replace "/usr/bin/env" $(type -tp env)
-    done
-    for i in `cat ${replace_usrinclude}`; do
-      substituteInPlace $i --replace "/usr/include" "${glibc}/include"
-    done
-    for i in `cat ${replace_usrbinperl}`; do
-      substituteInPlace $i --replace "/usr/bin/perl" $(type -tp perl)
-    done
-    for i in `cat ${replace_usrsrc}`; do
-      substituteInPlace $i --replace "/usr/src" "$TMP"
+    patchShebangs .
+    for i in `grep -l -R '/usr/\(include\|src\)' .`; do
+      echo "Patch /usr/include and /usr/src in $i"
+      substituteInPlace $i \
+        --replace "/usr/include" "${glibc}/include" \
+        --replace "/usr/src" "$TMP"
     done
-    echo "... done"
 
     ./regen.sh
 
-    ./configure \
-       --prefix=$out \
-       --with-linux-kernel-build=$TMP/linux \
-       --with-krb5-conf=${krb5}/bin/krb5-config \
-       --sysconfdir=/etc/static
-       #--with-afs-sysname=amd64_linux26 \
+    export KRB5_CONFIG=${krb5}/bin/krb5-config
 
-    substituteInPlace src/pinstall/install.c --replace "/bin/cp" $(type -tp cp)
+    configureFlagsArray=(
+      "--with-linux-kernel-build=$TMP/linux"
+      "--with-krb5"
+      "--sysconfdir=/etc/static"
+    )
   '';
 
   meta = {
-      description = "Open AFS client for Linux";
-      homepage = webpage;
-      license = "IPL";
+    description = "Open AFS client";
+    homepage = http://www.openafs.org;
+    license = stdenv.lib.licenses.ipl10;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
   };
 }
_______________________________________________
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to