* Build Xen's stubdoms, in particular pv-grub (needed to securely boot
from a kernel/initrd stored on a guest filesystem). svn path=/nixpkgs/trunk/; revision=24062
This commit is contained in:
parent
bcba3664d9
commit
b801c21d1f
@ -1,8 +1,34 @@
|
|||||||
{ stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl, python
|
{ stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl, python
|
||||||
, libuuid, gettext, ncurses, dev86, iasl, pciutils, bzip2, xz
|
, libuuid, gettext, ncurses, dev86, iasl, pciutils, bzip2, xz
|
||||||
, lvm2, utillinux, procps }:
|
, lvm2, utillinux, procps, texinfo }:
|
||||||
|
|
||||||
let version = "4.0.1"; in
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
version = "4.0.1";
|
||||||
|
|
||||||
|
# Sources needed to build the stubdoms.
|
||||||
|
|
||||||
|
stubdomSrcs =
|
||||||
|
[ { url = http://xenbits.xensource.com/xen-extfiles/lwip-1.3.0.tar.gz;
|
||||||
|
sha256 = "13wlr85s1hnvia6a698qpryyy12lvmqw0a05xmjnd0h71ralsbkp";
|
||||||
|
}
|
||||||
|
{ url = http://xenbits.xensource.com/xen-extfiles/zlib-1.2.3.tar.gz;
|
||||||
|
sha256 = "0pmh8kifb6sfkqfxc23wqp3f2wzk69sl80yz7w8p8cd4cz8cg58p";
|
||||||
|
}
|
||||||
|
{ url = http://xenbits.xensource.com/xen-extfiles/newlib-1.16.0.tar.gz;
|
||||||
|
sha256 = "01rxk9js833mwadq92jx0flvk9jyjrnwrq93j39c2j2wjsa66hnv";
|
||||||
|
}
|
||||||
|
{ url = http://xenbits.xensource.com/xen-extfiles/grub-0.97.tar.gz;
|
||||||
|
sha256 = "02r6b52r0nsp6ryqfiqchnl7r1d9smm80sqx24494gmx5p8ia7af";
|
||||||
|
}
|
||||||
|
{ url = http://xenbits.xensource.com/xen-extfiles/pciutils-2.2.9.tar.bz2;
|
||||||
|
sha256 = "092v4q478i1gc7f3s2wz6p4xlf1wb4gs5shbkn21vnnmzcffc2pn";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "xen-${version}";
|
name = "xen-${version}";
|
||||||
@ -20,12 +46,12 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ which zlib pkgconfig SDL openssl python libuuid gettext ncurses
|
[ which zlib pkgconfig SDL openssl python libuuid gettext ncurses
|
||||||
dev86 iasl pciutils bzip2 xz
|
dev86 iasl pciutils bzip2 xz texinfo
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = "PREFIX=$(out) CONFIG_DIR=/etc";
|
makeFlags = "PREFIX=$(out) CONFIG_DIR=/etc";
|
||||||
|
|
||||||
buildFlags = "xen tools";
|
buildFlags = "xen tools stubdom";
|
||||||
|
|
||||||
preBuild =
|
preBuild =
|
||||||
''
|
''
|
||||||
@ -55,6 +81,12 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
substituteInPlace tools/python/xen/xend/XendQCoWStorageRepo.py \
|
substituteInPlace tools/python/xen/xend/XendQCoWStorageRepo.py \
|
||||||
--replace /usr/sbin/qcow-create $out/sbin/qcow-create
|
--replace /usr/sbin/qcow-create $out/sbin/qcow-create
|
||||||
|
|
||||||
|
# Xen's stubdoms need various sources that it usually fetches at
|
||||||
|
# build time using wget. We can't have that.
|
||||||
|
${flip concatMapStrings stubdomSrcs (x: let src = fetchurl x; in ''
|
||||||
|
cp ${src} stubdom/${src.name}
|
||||||
|
'')}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
@ -80,5 +112,7 @@ stdenv.mkDerivation {
|
|||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.xen.org/;
|
homepage = http://www.xen.org/;
|
||||||
description = "Xen hypervisor and management tools for Dom0";
|
description = "Xen hypervisor and management tools for Dom0";
|
||||||
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||||
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user