Hi all,
I've written a nix expression for efibootmgr, a tool which allows you to
modify some of the nvram variables used by EFI and UEFI systems to
manage the boot process. efibootmgr should compile on non-{U,}EFI
systems, but since the tool relies on the information exported by the
efivars kernel module, which in turn requires that the kernel be booted
in {U,}EFI mode, it's useless unless you have a {U,}EFI system.
Cheers,
Shea Levy
Index: pkgs/tools/system/efibootmgr/default.nix
===================================================================
--- pkgs/tools/system/efibootmgr/default.nix (revision 0)
+++ pkgs/tools/system/efibootmgr/default.nix (revision 0)
@@ -0,0 +1,38 @@
+{stdenv, fetchurl, pciutils, perl, zlib}:
+
+let version = "0.5.4"; in
+
+stdenv.mkDerivation {
+ name = "efibootmgr-${version}";
+
+ buildInputs = [ pciutils zlib perl ];
+
+
+ src = fetchurl {
+ url =
"http://linux.dell.com/efibootmgr/permalink/efibootmgr-${version}.tar.gz";
+ sha256 = "0wcfgf8x4p4xfh38m9x3njwsxibm9bhnmvpjj94lj9sk9xxa8qmm";
+ };
+
+ patchPhase = ''
+ substituteInPlace "./tools/install.pl" \
+ --replace "/usr/bin/perl" "${perl}/bin/perl"
+ '';
+
+ buildPhase = ''
+ make BINDIR=$out/sbin
+ '';
+
+ installPhase = ''
+ ensureDir $out/sbin
+ make BINDIR=$out/sbin install
+ '';
+
+ meta = {
+ description = "A Linux user-space application to modify the Intel
Extensible Firmware Interface (EFI) Boot Manager";
+ homepage = http://linux.dell.com/efibootmgr/;
+ license = "GPLv2";
+ maintainers = [ "Shea Levy <[email protected]>" ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
+
Index: pkgs/top-level/all-packages.nix
===================================================================
--- pkgs/top-level/all-packages.nix (revision 26180)
+++ pkgs/top-level/all-packages.nix (working copy)
@@ -596,6 +596,8 @@
ecryptfs = callPackage ../tools/security/ecryptfs { };
+ efibootmgr = callPackage ../tools/system/efibootmgr { };
+
enblendenfuse = callPackage ../tools/graphics/enblend-enfuse { };
encfs = callPackage ../tools/filesystems/encfs { };
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev