pvgrub_image: add package

Add a package containing a pvgrub image for xen generated from grub2
This commit is contained in:
Michał Pałka
2017-07-05 12:23:30 +00:00
parent d15e20f9c9
commit 55208cc2e1
5 changed files with 63 additions and 1 deletions
+4 -1
View File
@@ -3,6 +3,7 @@
, zfs ? null
, efiSupport ? false
, zfsSupport ? true
, xenSupport ? false
}:
with stdenv.lib;
@@ -46,6 +47,7 @@ in (
assert efiSupport -> canEfi;
assert zfsSupport -> zfs != null;
assert !(efiSupport && xenSupport);
stdenv.mkDerivation rec {
name = "grub-${version}";
@@ -98,7 +100,8 @@ stdenv.mkDerivation rec {
patches = [ ./fix-bash-completion.patch ];
configureFlags = optional zfsSupport "--enable-libzfs"
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ];
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
# save target that grub is compiled for
grubTarget = if efiSupport