about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-30 13:45:48 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-30 13:45:48 +0000
commit769c44da986e830460742418e46f163cc271de85 (patch)
treec670b18a9cd43cb51a40de1c2d72c14af69527ab /pkgs
parent9050bc10fed5951290b18982ccf3a3e9b7f55e0e (diff)
* Get User Mode Linux to compile again:
  - Hack to make it work with the latest host kernel headers
    (2.6.18.1).
  - Don't call depmod impurily, rather use oldskool modutils.
  - modutils: use the final version, and use GCC 3.4 to compile it
    (4.1 doesn't work).

svn path=/nixpkgs/trunk/; revision=6908
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/misc/uml/builder.sh2
-rw-r--r--pkgs/misc/uml/default.nix9
-rw-r--r--pkgs/os-specific/linux/modutils/default.nix6
-rw-r--r--pkgs/top-level/all-packages.nix5
-rw-r--r--pkgs/top-level/build-for-release.nix2
5 files changed, 16 insertions, 8 deletions
diff --git a/pkgs/misc/uml/builder.sh b/pkgs/misc/uml/builder.sh
index b61c4f106174a..0d786586ef073 100644
--- a/pkgs/misc/uml/builder.sh
+++ b/pkgs/misc/uml/builder.sh
@@ -31,7 +31,7 @@ installPhase() {
     mkdir $out
     mkdir $out/bin
     cp -p linux $out/bin
-    make modules_install INSTALL_MOD_PATH=$out ARCH=um
+    make modules_install INSTALL_MOD_PATH=$out ARCH=um DEPMOD=$modutils/sbin/depmod
 }
 installPhase=installPhase
 
diff --git a/pkgs/misc/uml/default.nix b/pkgs/misc/uml/default.nix
index 48e8692513256..406eca809bd0a 100644
--- a/pkgs/misc/uml/default.nix
+++ b/pkgs/misc/uml/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, perl, m4, gcc}:
+{stdenv, fetchurl, perl, m4, gcc, modutils}:
 
 assert perl != null && m4 != null;
 
@@ -19,4 +19,11 @@ stdenv.mkDerivation {
   config = ./config;
   buildInputs = [perl m4];
   NIX_GCC = gcc;
+
+  # Quick hack to get UML to build with the latest kernel headers,
+  # which don't export the macro `offsetof' anymore unless __KERNEL__
+  # is set.
+  NIX_CFLAGS_COMPILE = "-Doffsetof(TYPE,MEMBER)=((size_t)&((TYPE*)0)->MEMBER)";
+
+  inherit modutils;
 }
diff --git a/pkgs/os-specific/linux/modutils/default.nix b/pkgs/os-specific/linux/modutils/default.nix
index 19f9efae19ce3..ff0d25331aadc 100644
--- a/pkgs/os-specific/linux/modutils/default.nix
+++ b/pkgs/os-specific/linux/modutils/default.nix
@@ -1,10 +1,10 @@
 {stdenv, fetchurl, bison, flex}:
 
 stdenv.mkDerivation {
-  name = "modutils-2.4.25";
+  name = "modutils-2.4.27";
   src = fetchurl {
-    url = http://nix.cs.uu.nl/dist/tarballs/modutils-2.4.25.tar.bz2;
-    md5 = "2c0cca3ef6330a187c6ef4fe41ecaa4d";
+    url = http://www.kernel.org/pub/linux/utils/kernel/modutils/v2.4/modutils-2.4.27.tar.bz2;
+    md5 = "bac989c74ed10f3bf86177fc5b4b89b6";
   };
   buildInputs = [bison flex];
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 72c4114246e74..664652b206383 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2137,7 +2137,8 @@ rec {
   };
 
   modutils = import ../os-specific/linux/modutils {
-    inherit fetchurl stdenv bison flex;
+    inherit fetchurl bison flex;
+    stdenv = overrideGCC stdenv gcc34;
   };
 
   nettools = import ../os-specific/linux/net-tools {
@@ -2848,7 +2849,7 @@ rec {
   };
 
   uml = import ../misc/uml {
-    inherit fetchurl stdenv perl;
+    inherit fetchurl stdenv perl modutils;
     m4 = gnum4;
     gcc = gcc33;
   };
diff --git a/pkgs/top-level/build-for-release.nix b/pkgs/top-level/build-for-release.nix
index ae0a512a16dd8..68cfed95b5fee 100644
--- a/pkgs/top-level/build-for-release.nix
+++ b/pkgs/top-level/build-for-release.nix
@@ -105,7 +105,7 @@ let {
     thunderbird
     tightvnc
 #    transformers
-#    uml
+    uml
     unzip
     uulib
     valgrind