2013-10-09 16:30:44 +02:00
|
|
|
{ stdenv, fetchgit, libuuid, pythonFull, iasl }:
|
2012-03-14 05:18:52 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2012-03-14 07:57:58 +01:00
|
|
|
targetArch = if stdenv.isi686 then
|
|
|
|
"IA32"
|
|
|
|
else if stdenv.isx86_64 then
|
|
|
|
"X64"
|
|
|
|
else
|
|
|
|
throw "Unsupported architecture";
|
2012-03-14 05:18:52 +01:00
|
|
|
|
2012-03-14 07:57:58 +01:00
|
|
|
edk2 = stdenv.mkDerivation {
|
2014-12-11 06:46:05 +01:00
|
|
|
name = "edk2-2014-12-10";
|
2016-02-09 00:07:09 +01:00
|
|
|
|
2013-10-09 16:30:44 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = git://github.com/tianocore/edk2;
|
2014-12-11 06:46:05 +01:00
|
|
|
rev = "684a565a04";
|
|
|
|
sha256 = "1l46396f48v91z5b8lh3b0f0lcd7z5f86i1nrpc7l5gf7gx3117j";
|
2012-03-14 05:18:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libuuid pythonFull ];
|
|
|
|
|
2016-02-09 00:07:09 +01:00
|
|
|
makeFlags = "-C BaseTools";
|
|
|
|
|
|
|
|
hardening_fortify = false;
|
|
|
|
hardening_format = false;
|
2012-03-14 05:18:52 +01:00
|
|
|
|
2012-03-14 07:57:58 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -vp $out
|
|
|
|
mv -v BaseTools $out
|
|
|
|
mv -v EdkCompatibilityPkg $out
|
|
|
|
mv -v edksetup.sh $out
|
|
|
|
'';
|
2012-03-14 05:18:52 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Intel EFI development kit";
|
2014-12-21 00:00:35 +01:00
|
|
|
homepage = http://sourceforge.net/projects/edk2/;
|
|
|
|
license = stdenv.lib.licenses.bsd2;
|
2012-03-14 05:18:52 +01:00
|
|
|
platforms = ["x86_64-linux" "i686-linux"];
|
|
|
|
};
|
2012-03-14 07:57:58 +01:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
setup = projectDscPath: attrs: {
|
|
|
|
buildInputs = [ pythonFull ] ++
|
|
|
|
stdenv.lib.optionals (attrs ? buildInputs) attrs.buildInputs;
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir -v Conf
|
|
|
|
sed -e 's|Nt32Pkg/Nt32Pkg.dsc|${projectDscPath}|' -e \
|
2015-07-20 08:01:20 +02:00
|
|
|
's|MYTOOLS|GCC49|' -e 's|IA32|${targetArch}|' -e 's|DEBUG|RELEASE|'\
|
2012-03-14 07:57:58 +01:00
|
|
|
< ${edk2}/BaseTools/Conf/target.template > Conf/target.txt
|
2014-02-04 00:32:21 +01:00
|
|
|
sed -e 's|DEFINE GCC48_IA32_PREFIX = /usr/bin/|DEFINE GCC48_IA32_PREFIX = ""|' \
|
|
|
|
-e 's|DEFINE GCC48_X64_PREFIX = /usr/bin/|DEFINE GCC48_X64_PREFIX = ""|' \
|
2012-03-14 07:57:58 +01:00
|
|
|
-e 's|DEFINE UNIX_IASL_BIN = /usr/bin/iasl|DEFINE UNIX_IASL_BIN = ${iasl}/bin/iasl|' \
|
|
|
|
< ${edk2}/BaseTools/Conf/tools_def.template > Conf/tools_def.txt
|
|
|
|
export WORKSPACE="$PWD"
|
|
|
|
export EFI_SOURCE="$PWD/EdkCompatibilityPkg"
|
|
|
|
ln -sv ${edk2}/BaseTools BaseTools
|
|
|
|
ln -sv ${edk2}/EdkCompatibilityPkg EdkCompatibilityPkg
|
|
|
|
. ${edk2}/edksetup.sh BaseTools
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = "
|
|
|
|
build
|
|
|
|
";
|
|
|
|
|
2012-03-14 23:43:07 +01:00
|
|
|
installPhase = "mv -v Build/*/* $out";
|
2012-03-14 07:57:58 +01:00
|
|
|
} // (removeAttrs attrs [ "buildInputs" ] );
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
edk2
|