summary refs log tree commit diff
path: root/pkgs/tools/system/efibootmgr/default.nix
blob: bf4c429808b22f09872818dbd41fff4bd50f5481 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
  };
}