summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-03-01 07:04:39 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2012-03-01 07:04:39 +0000
commit0210e20b5ae5ee9f9652d2eedf955974cc9e5ddc (patch)
treec1c7f6ea999ae4f455500ba2599c58e41aa581ad /pkgs/os-specific
parentb14a737a4d86608bd61acf08cfc479bf262e9d99 (diff)
parent57b612cb050778c4ded12fe8e45de26b91eeef70 (diff)
svn merge ^/nixpkgs/trunk
svn path=/nixpkgs/branches/stdenv-updates/; revision=32713
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/apparmor/default.nix93
-rw-r--r--pkgs/os-specific/linux/gogoclient/config-paths.patch39
-rw-r--r--pkgs/os-specific/linux/gogoclient/default.nix38
-rw-r--r--pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch22
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix6
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy173.nix6
-rw-r--r--pkgs/os-specific/linux/qemu-kvm/1.0.nix51
-rw-r--r--pkgs/os-specific/linux/qemu-kvm/default.nix11
8 files changed, 253 insertions, 13 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix
new file mode 100644
index 0000000000000..8a7d2b9e45813
--- /dev/null
+++ b/pkgs/os-specific/linux/apparmor/default.nix
@@ -0,0 +1,93 @@
+{ stdenv, fetchurl
+, autoconf, automake, libtool, makeWrapper
+, perl, bison, flex, glibc, gettext, which, rpm, tetex, LocaleGettext, bash, pam, TermReadKey, RpcXML, swig}:
+stdenv.mkDerivation rec {
+
+  name = "apparmor-${version}";
+  version = "2.6.1";
+
+  src = fetchurl {
+    url = "http://launchpad.net/apparmor/2.6/2.6.1/+download/${name}.tar.gz";
+    sha256 = "1x7225xgzyc5agbn41xsip236anr1kmaw70xc94pag82q7c1bc4w";
+  };
+
+  buildInputs = [ autoconf automake libtool perl bison flex gettext which rpm tetex LocaleGettext pam TermReadKey RpcXML swig makeWrapper ];
+
+  prePatch = ''
+    substituteInPlace libraries/libapparmor/src/Makefile.in --replace "/usr/include" "${glibc}/include"
+    substituteInPlace libraries/libapparmor/src/Makefile.am --replace "/usr/include" "${glibc}/include"
+    substituteInPlace common/Make.rules --replace "/usr/bin/pod2man" "${perl}/bin/pod2man"
+    substituteInPlace common/Make.rules --replace "/usr/bin/pod2html" "${perl}/bin/pod2html"
+
+    substituteInPlace parser/Makefile --replace "/usr/bin/bison" "${bison}/bin/bison"
+    substituteInPlace parser/Makefile --replace "/usr/bin/flex" "${flex}/bin/flex"
+    substituteInPlace parser/Makefile --replace "/usr/include/bits/socket.h" "${glibc}/include/bits/socket.h"
+    substituteInPlace parser/Makefile --replace "/usr/include/linux/capability.h" "${glibc}/include/linux/capability.h"
+
+    substituteInPlace parser/tst/gen-xtrans.pl --replace "/usr/bin/perl" "${perl}/bin/perl"
+    substituteInPlace parser/tst/Makefile --replace "/usr/bin/prove" "${perl}/bin/prove"
+    substituteInPlace parser/tst/Makefile --replace "./caching.sh" "${bash}/bin/bash ./caching.sh"
+  '';
+
+  buildPhase =''
+    PERL5LIB=$PERL5LIB:$out/lib/perl5/site_perl:$out/lib
+
+    cd libraries/libapparmor
+    ./autogen.sh
+    ./configure --prefix=$out --with-perl	# see below
+    make
+    make check
+    make install
+    ensureDir $out/lib/perl5/site_perl/
+    cp swig/perl/LibAppArmor.pm $out/lib/perl5/site_perl/
+    cp swig/perl/LibAppArmor.bs $out/lib/perl5/site_perl/
+# this is automatically copied elsewhere....
+
+    cd ../../utils
+    make
+    make install DESTDIR=$out BINDIR=$out/bin VENDOR_PERL=/lib/perl5/site_perl
+
+    cd ../parser
+    make
+    make install DESTDIR=$out DISTRO=unknown
+
+#    cd ../changehat/mod_apparmor
+#    make		# depends on libapparmor having been built first
+#    make install
+
+    cd ../changehat/pam_apparmor
+    make		# depends on libapparmor having been built first
+    make install DESTDIR=$out
+
+    cd ../../profiles
+LD_LIBRARY_PATH=$out/lib    make
+#LD_LIBRARY_PATH=$out/lib    make check	# depends on the parser having been built first
+    make install DESTDIR=$out
+
+  '';
+  installPhase = ''
+    for i in $out/bin/*;  do
+      wrapProgram $i --prefix PERL5LIB : "$PERL5LIB:$out/lib/perl5/5.10.1/i686-linux-thread-multi/"
+    done
+  '';
+  passthru = {
+    linux_2_6_37_patch = {
+      name= "apparmor";
+      features.apparmor = true;
+      patch = [
+	"${src}/kernel-patches/2.6.37/0001-AppArmor-compatibility-patch-for-v5-network-controll.patch"
+	"${src}/kernel-patches/2.6.37/0002-AppArmor-compatibility-patch-for-v5-interface.patch"
+	"${src}/kernel-patches/2.6.37/0003-AppArmor-Allow-dfa-backward-compatibility-with-broke.patch"
+      ];
+    };
+  };
+
+  meta = with stdenv.lib; {
+    homepage = http://apparmor.net/;
+    description = "A Linux application security system";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.phreedom ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/pkgs/os-specific/linux/gogoclient/config-paths.patch b/pkgs/os-specific/linux/gogoclient/config-paths.patch
new file mode 100644
index 0000000000000..88358038bc7e7
--- /dev/null
+++ b/pkgs/os-specific/linux/gogoclient/config-paths.patch
@@ -0,0 +1,39 @@
+diff -urN gogoc-1_2-RELEASE/gogoc-tsp/conf/gogoc.conf.in gogoc-1_2-RELEASE-fix/gogoc-tsp/conf/gogoc.conf.in
+--- gogoc-1_2-RELEASE/gogoc-tsp/conf/gogoc.conf.in	2009-11-20 17:53:12.000000000 +0100
++++ gogoc-1_2-RELEASE-fix/gogoc-tsp/conf/gogoc.conf.in	2012-02-25 15:16:12.758849219 +0100
+@@ -224,7 +224,7 @@
+ #
+ #   broker_list=<file_name>
+ #  
+-broker_list=tsp-broker-list.txt
++broker_list=/var/lib/gogoc/tsp-broker-list.txt
+ 
+ #
+ # Last Server Used File Name:
+@@ -234,7 +234,7 @@
+ #
+ #   last_server=<file_name>
+ #
+-last_server=tsp-last-server.txt
++last_server=/var/lib/gogoc/tsp-last-server.txt
+ 
+ #
+ # Always Use Last Known Working Server:
+@@ -294,7 +294,7 @@
+ #
+ #   log_filename=<file_name>
+ #
+-log_filename=gogoc.log
++log_filename=/var/log/gogoc.log
+ 
+ #
+ # Log File Rotation:
+@@ -313,7 +313,7 @@
+ #
+ #   log_rotation=<yes|no>
+ #
+-log_rotation=yes
++log_rotation=no
+ 
+ #
+ # Log File Rotation Size:
diff --git a/pkgs/os-specific/linux/gogoclient/default.nix b/pkgs/os-specific/linux/gogoclient/default.nix
new file mode 100644
index 0000000000000..d1a4bf9feb65a
--- /dev/null
+++ b/pkgs/os-specific/linux/gogoclient/default.nix
@@ -0,0 +1,38 @@
+{stdenv, fetchurl, openssl, nettools, iproute, procps}:
+
+let baseName = "gogoclient";
+    version  = "1.2";
+in
+
+stdenv.mkDerivation rec {
+  name = "${baseName}-${version}";
+
+  src = fetchurl {
+    url = http://gogo6.com/downloads/gogoc-1_2-RELEASE.tar.gz;
+    sha256 = "a0ef45c0bd1fc9964dc8ac059b7d78c12674bf67ef641740554e166fa99a2f49";
+  };
+  patches = [./gcc46-include-fix.patch ./config-paths.patch ];
+  makeFlags = ["target=linux"];
+  installFlags = ["installdir=$(out)"];
+
+  buildInputs = [openssl];
+
+  preFixup = ''
+    ensureDir $out/share/${name}
+    chmod 444 $out/bin/gogoc.conf
+    mv $out/bin/gogoc.conf $out/share/${name}/gogoc.conf.sample
+    rm $out/bin/gogoc.conf.sample
+
+    substituteInPlace "$out/template/linux.sh" \
+      --replace "/sbin/ifconfig" "${nettools}/sbin/ifconfig" \
+      --replace "/sbin/route"    "${nettools}/sbin/route" \
+      --replace "/sbin/ip"       "${iproute}/sbin/ip" \
+      --replace "/sbin/sysctl"   "${procps}/sbin/sysctl"
+  '';
+
+  meta = {
+    homepage = http://gogonet.gogo6.com;
+    description = "Client to connect to the Freenet6 IPv6 tunnel broker service";
+    maintainers = [stdenv.lib.maintainers.bluescreen303];
+  };
+}
diff --git a/pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch b/pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch
new file mode 100644
index 0000000000000..22ecad187d62c
--- /dev/null
+++ b/pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch
@@ -0,0 +1,22 @@
+diff -urN gogoc-1_2-RELEASE/gogoc-messaging/src/clientmsgsender.cc gogoc-1_2-RELEASE-fix/gogoc-messaging/src/clientmsgsender.cc
+--- gogoc-1_2-RELEASE/gogoc-messaging/src/clientmsgsender.cc	2009-11-20 17:34:55.000000000 +0100
++++ gogoc-1_2-RELEASE-fix/gogoc-messaging/src/clientmsgsender.cc	2012-02-25 15:06:20.764698284 +0100
+@@ -15,6 +15,7 @@
+ // **************************************************************************
+ #include <gogocmessaging/clientmsgsender.h>
+ #include <assert.h>
++#include <stddef.h>
+ 
+ 
+ namespace gogocmessaging
+diff -urN gogoc-1_2-RELEASE/gogoc-messaging/src/servermsgsender.cc gogoc-1_2-RELEASE-fix/gogoc-messaging/src/servermsgsender.cc
+--- gogoc-1_2-RELEASE/gogoc-messaging/src/servermsgsender.cc	2009-11-20 17:34:56.000000000 +0100
++++ gogoc-1_2-RELEASE-fix/gogoc-messaging/src/servermsgsender.cc	2012-02-25 15:06:36.722740288 +0100
+@@ -15,6 +15,7 @@
+ // **************************************************************************
+ #include <gogocmessaging/servermsgsender.h>
+ #include <assert.h>
++#include <stddef.h>
+ 
+ 
+ namespace gogocmessaging
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index 5b829db09cd0c..23d1062cc3982 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -7,7 +7,7 @@
 
 with stdenv.lib;
 
-let versionNumber = "290.10"; in
+let versionNumber = "295.20"; in
 
 stdenv.mkDerivation {
   name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}";
@@ -18,12 +18,12 @@ stdenv.mkDerivation {
     if stdenv.system == "i686-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
-        sha256 = "1amdqmgi8rf8mafc5d8jnw6rk1bxrmxc5jm4wm2p8xqzm99qzglr";
+        sha256 = "006my8y7dkmzy1y3md1j2p9sy53cvhz7idkjgzizyg05jgac778g";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
-        sha256 = "01d4cci1ipnamrxisdvsxjr6d4qbj257b46y0glm6grnw11i3x2g";
+        sha256 = "1m69ki94szy7inqc5x2znab9jjqjfyjd4lwvx9qnazq918gdf1kx";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";
 
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix
index 638f2e4360e7a..541e442f6b175 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix
@@ -2,7 +2,7 @@
 
 let 
 
-  versionNumber = "173.14.27";
+  versionNumber = "173.14.31";
 
 in
 
@@ -15,12 +15,12 @@ stdenv.mkDerivation {
     if stdenv.system == "i686-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run";
-        sha256 = "08l3zs7sb8n4vjm1vg3yy1pkj54dq7gfrjashlqwbznaa2cdwknb";
+        sha256 = "090rkl1psmcsx3mxb6lnirqipka8vp78y2j7pzqyzl592qpscmg8";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run";
-        sha256 = "0pmg5whpk0rmzg8zb7qq2imva2hf346c4pvpz5sjir6346350blw";
+        sha256 = "0hs4fd61iha7b2936wj5w5fj3rxmw60jnkgf6l1pl3va7sfw30d2";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";
 
diff --git a/pkgs/os-specific/linux/qemu-kvm/1.0.nix b/pkgs/os-specific/linux/qemu-kvm/1.0.nix
new file mode 100644
index 0000000000000..162fcaee55a6e
--- /dev/null
+++ b/pkgs/os-specific/linux/qemu-kvm/1.0.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl, attr, zlib, SDL, alsaLib, pkgconfig, pciutils, libuuid, vde2
+, libjpeg, libpng, ncurses, python, glib }:
+
+assert stdenv.isLinux;
+
+let version = "1.0"; in
+stdenv.mkDerivation rec {
+  name = "qemu-kvm-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/kvm/qemu-kvm/${version}/${name}.tar.gz";
+    sha256 = "0vhigv9r9yrhph4wc4mhg99a683iwf121kjigqzg92x2l3ayl4dp";
+  };
+
+  patches = [ ./smb-tmpdir.patch ./qemu-img-fix-corrupt-vdi.patch ];
+  postPatch =
+    '' for i in $(find kvm -type f)
+       do
+         sed -i "$i" \
+             -e 's|/bin/bash|/bin/sh|g ;
+                 s|/usr/bin/python|${python}/bin/python|g ;
+                 s|/bin/rm|rm|g'
+       done
+    '';
+
+  configureFlags =
+    [ "--audio-drv-list=alsa"
+      "--smbd=smbd"                               # use `smbd' from $PATH
+    ];
+
+  enableParallelBuilding = true;
+
+  buildInputs =
+    [ attr zlib SDL alsaLib pkgconfig pciutils libuuid vde2 libjpeg libpng
+      ncurses python glib
+    ];
+
+  postInstall =
+    ''
+      # Libvirt expects us to be called `qemu-kvm'.  Otherwise it will
+      # set the domain type to "qemu" rather than "kvm", which can
+      # cause architecture selection to misbehave.
+      ln -sv $(cd $out/bin && echo qemu-system-*) $out/bin/qemu-kvm
+    '';
+
+  meta = {
+    homepage = http://www.linux-kvm.org/;
+    description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/os-specific/linux/qemu-kvm/default.nix b/pkgs/os-specific/linux/qemu-kvm/default.nix
index aa92b2f2d0d1f..c5c7e0b01f0a0 100644
--- a/pkgs/os-specific/linux/qemu-kvm/default.nix
+++ b/pkgs/os-specific/linux/qemu-kvm/default.nix
@@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
 
   patches = [ ./smb-tmpdir.patch ./qemu-img-fix-corrupt-vdi.patch ];
 
-  configureFlags = "--audio-drv-list=alsa";
+  configureFlags =
+    [ "--audio-drv-list=alsa"
+      "--smbd=smbd"                               # use `smbd' from $PATH
+    ];
 
   enableParallelBuilding = true;
 
@@ -22,12 +25,6 @@ stdenv.mkDerivation rec {
       ncurses python glib
     ];
 
-  preBuild =
-    ''
-      # Don't use a hardcoded path to Samba.
-      substituteInPlace ./net.h --replace /usr/sbin/smbd smbd
-    '';
-
   postInstall =
     ''
       # extboot.bin isn't installed due to a bug in the Makefile.