From d9e28e909c330f7ed0d809369b29d6177bdf7d2d Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Mar 2012 11:53:50 +0000 Subject: [PATCH] Move NixosBootPkg into NixOS svn path=/nixos/trunk/; revision=33149 --- modules/installer/cd-dvd/iso-image.nix | 4 ++- .../installer/efi-boot-stub/efi-boot-stub.nix | 4 ++- .../efi-boot-stub/nixos-boot-pkg.nix | 29 +++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 modules/installer/efi-boot-stub/nixos-boot-pkg.nix diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix index 0c0fe9880214..a0acead6febe 100644 --- a/modules/installer/cd-dvd/iso-image.nix +++ b/modules/installer/cd-dvd/iso-image.nix @@ -246,7 +246,9 @@ in { source = bootParams; 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"; } ]; diff --git a/modules/installer/efi-boot-stub/efi-boot-stub.nix b/modules/installer/efi-boot-stub/efi-boot-stub.nix index 7f4d8cba775b..c8236b6fdd89 100644 --- a/modules/installer/efi-boot-stub/efi-boot-stub.nix +++ b/modules/installer/efi-boot-stub/efi-boot-stub.nix @@ -88,7 +88,9 @@ let inherit (config.boot.loader.efiBootStub) efiSysMountPoint runEfibootmgr installStartupNsh efiDisk efiPartition installRemovableMediaImage; kernelFile = platform.kernelTarget; } // 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 "IA32" else if pkgs.stdenv.isx86_64 then diff --git a/modules/installer/efi-boot-stub/nixos-boot-pkg.nix b/modules/installer/efi-boot-stub/nixos-boot-pkg.nix new file mode 100644 index 000000000000..5bce1789a02c --- /dev/null +++ b/modules/installer/efi-boot-stub/nixos-boot-pkg.nix @@ -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"]; + }; +})