2014-06-19 01:39:47 +01:00
|
|
|
{ stdenv, fetchurl }:
|
2012-03-14 01:23:31 +00:00
|
|
|
|
2014-06-19 01:39:47 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnu-efi_${version}";
|
2014-06-30 08:17:19 +01:00
|
|
|
version = "3.0u";
|
2012-03-14 01:23:31 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-06-19 01:39:47 +01:00
|
|
|
url = "mirror://sourceforge/gnu-efi/${name}.orig.tar.gz";
|
2014-06-30 08:17:19 +01:00
|
|
|
sha256 = "0klkdxh1aqwwfm393q67nxww6liffyp2lfybbnh4q819b06la39w";
|
2012-03-14 01:23:31 +00:00
|
|
|
};
|
|
|
|
|
2014-06-19 01:39:47 +01:00
|
|
|
arch = with stdenv.lib; head (splitString "-" stdenv.system);
|
2012-03-14 01:23:31 +00:00
|
|
|
|
2014-01-18 16:49:59 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=gcc"
|
2012-03-14 01:23:31 +00:00
|
|
|
"AS=as"
|
|
|
|
"LD=ld"
|
|
|
|
"AR=ar"
|
|
|
|
"RANLIB=ranlib"
|
|
|
|
"OBJCOPY=objcopy"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2014-01-18 16:49:59 +00:00
|
|
|
make $makeFlags
|
|
|
|
make $makeFlags -C apps clean all
|
2012-03-14 01:23:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-19 01:39:47 +01:00
|
|
|
mkdir -pv $out/include/efi/{protocol,$arch}
|
2014-01-18 16:49:59 +00:00
|
|
|
make PREFIX="$out" $makeFlags install
|
2012-03-14 01:23:31 +00:00
|
|
|
mkdir -pv $out/share/gnu-efi
|
|
|
|
install -D -m644 apps/*.efi $out/share/gnu-efi
|
|
|
|
'';
|
2014-06-19 01:39:47 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GNU EFI development toolchain";
|
|
|
|
homepage = http://sourceforge.net/projects/gnu-efi/;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2012-03-14 01:23:31 +00:00
|
|
|
}
|