Move NixosBootPkg into NixOS
svn path=/nixos/trunk/; revision=33149
This commit is contained in:
parent
c61d919941
commit
d9e28e909c
@ -246,7 +246,9 @@ in
|
|||||||
{ source = bootParams;
|
{ source = bootParams;
|
||||||
target = "/efi/nixos/boot-params";
|
target = "/efi/nixos/boot-params";
|
||||||
}
|
}
|
||||||
{ source = "${pkgs.NixosBootPkg}/*/NixosBoot.efi";
|
{ source = ''${import ../efi-boot-stub/nixos-boot-pkg.nix {
|
||||||
|
inherit (pkgs) edk2 stdenv fetchhg;
|
||||||
|
}}/*/NixosBoot.efi'';
|
||||||
target = "/efi/boot/boot${targetArch}.efi";
|
target = "/efi/boot/boot${targetArch}.efi";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -88,7 +88,9 @@ let
|
|||||||
inherit (config.boot.loader.efiBootStub) efiSysMountPoint runEfibootmgr installStartupNsh efiDisk efiPartition installRemovableMediaImage;
|
inherit (config.boot.loader.efiBootStub) efiSysMountPoint runEfibootmgr installStartupNsh efiDisk efiPartition installRemovableMediaImage;
|
||||||
kernelFile = platform.kernelTarget;
|
kernelFile = platform.kernelTarget;
|
||||||
} // pkgs.stdenv.lib.optionalAttrs config.boot.loader.efiBootStub.installRemovableMediaImage rec {
|
} // pkgs.stdenv.lib.optionalAttrs config.boot.loader.efiBootStub.installRemovableMediaImage rec {
|
||||||
removableMediaImage = "${pkgs.NixosBootPkg}/${targetArch}/NixosBoot.efi";
|
removableMediaImage = ''${import ./nixos-boot-pkg.nix {
|
||||||
|
inherit (pkgs) edk2 stdenv fetchhg;
|
||||||
|
}}/${targetArch}/NixosBoot.efi'';
|
||||||
targetArch = if pkgs.stdenv.isi686 then
|
targetArch = if pkgs.stdenv.isi686 then
|
||||||
"IA32"
|
"IA32"
|
||||||
else if pkgs.stdenv.isx86_64 then
|
else if pkgs.stdenv.isx86_64 then
|
||||||
|
29
modules/installer/efi-boot-stub/nixos-boot-pkg.nix
Normal file
29
modules/installer/efi-boot-stub/nixos-boot-pkg.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ stdenv, edk2, fetchhg }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
src = fetchhg {
|
||||||
|
url = https://bitbucket.org/shlevy/nixosbootpkg;
|
||||||
|
tag = "1ff4c2891c8c1eb03677a6f8b04b8d05807ec198";
|
||||||
|
sha256 = "06zwy0g9a7g2sny7phvn2z76pb3wnw4vm9vsrjjaj7f7nzcsn13k";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation (edk2.setup "NixosBootPkg/NixosBootPkg.dsc" {
|
||||||
|
name = "NixosBootPkg-2012-03-15";
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
ln -sv ${src} NixosBootPkg
|
||||||
|
ln -sv ${edk2.src}/MdePkg .
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description =
|
||||||
|
"Simple EFI app to load the kernel with NixOS-specific arguments";
|
||||||
|
homepage = http://www.shealevy.com;
|
||||||
|
license = "MIT";
|
||||||
|
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||||
|
platforms = ["x86_64-linux" "i686-linux"];
|
||||||
|
};
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user