Created
December 3, 2017 02:55
-
-
Save logarytm/628b111b2739cf64c52eaf7d7b3157e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> { }; | |
stdenv.mkDerivation { | |
name = "binutils-2.29-x86_64-elf"; | |
builder = ./build-binutils.sh; | |
src = fetchurl { | |
url = https://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.xz; | |
sha256 = "118ybdwcx3dbfzfqav9h0nill8jd7ca74kr6z1208qjc3hkix1qb"; | |
}; | |
platform = "x86_64-elf"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source $stdenv/setup | |
# I have no idea what it's doing. | |
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy | |
mkdir $NIX_FIXINC_DUMMY | |
preConfigure=preConfigure | |
preConfigure() { | |
# Cross compiler evilness | |
mkdir -p $out | |
mkdir -p $out/x86_64-elf | |
mkdir -p $out/x86_64-elf/bin | |
# Perform the build in a different directory. | |
mkdir ../build | |
cd ../build | |
configureScript=../$sourceRoot/configure | |
configureFlags="--target=$platform --disable-nls --disable-werror" | |
} | |
postInstall=postInstall | |
postInstall() { | |
: | |
} | |
genericBuild |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment