On 3/6/11 11:08 PM, Shea Levy wrote:
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
Resubmitting a slightly cleaner patch for this.
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,33 @@
+{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"
+ '';
+
+ preBuild = ''
+ export makeFlags="BINDIR=$out/sbin"
+ '';
+
+ 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 = [ stdenv.lib.maintainers.shlevy ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
+
Index: pkgs/top-level/all-packages.nix
===================================================================
--- pkgs/top-level/all-packages.nix (revision 26445)
+++ pkgs/top-level/all-packages.nix (working copy)
@@ -591,6 +591,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