summary refs log tree commit diff
path: root/pkgs/development/libraries/gnu-efi/default.nix
blob: 731b44aa0ecdeb912676f12cce83a0fda90c3434 (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
34
35
36
37
38
39
40
{ stdenv
, fetchurl
}:

stdenv.mkDerivation {
  name = "gnu-efi-3.0r";

  src = fetchurl {
    url = "mirror://sourceforge/gnu-efi/gnu-efi_3.0r.orig.tar.gz";
    sha256 = "1zi298wsg8v29xj4azcawqfjbxqi2w7l60agf7x2ph2lnqlga2v5";
  };

  meta = {
    description = "GNU EFI development toolchain";
    homepage = http://sourceforge.net/projects/gnu-efi/;
    license = "GPL";
    maintainers = [ stdenv.lib.maintainers.shlevy ];
    platforms = ["x86_64-linux" "i686-linux"];
  };

  buildFlags = [
    "CC=cc"
    "AS=as"
    "LD=ld"
    "AR=ar"
    "RANLIB=ranlib"
    "OBJCOPY=objcopy"
  ];

  buildPhase = ''
    make $buildFlags
    make $buildFlags -C apps clean all
  '';

  installPhase = ''
    make INSTALLROOT="$out" install
    mkdir -pv $out/share/gnu-efi
    install -D -m644 apps/*.efi $out/share/gnu-efi
  '';
}