nixpkgs/pkgs/misc/uml/default.nix
Eelco Dolstra 769c44da98 * 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
2006-10-30 13:45:48 +00:00

30 lines
862 B
Nix

{stdenv, fetchurl, perl, m4, gcc, modutils}:
assert perl != null && m4 != null;
stdenv.mkDerivation {
name = "uml-2.4.27-1";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/linux-2.4.27.tar.bz2;
md5 = "59a2e6fde1d110e2ffa20351ac8b4d9e";
};
umlPatch = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/uml-patch-2.4.27-1.bz2;
md5 = "63178bbd3a383a1005738f4628ff583e";
};
noAioPatch = ./no-aio.patch;
# hostfsPatch = ./hostfs.patch;
# hostfsAccessPatch = ./hostfs-access.patch;
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;
}