Last active
November 12, 2018 12:36
-
-
Save Mic92/2d632b0b7eb2d48c83a11ed924f58545 to your computer and use it in GitHub Desktop.
nix-shell environment for SPEC 2017 benchmark.
This file contains 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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
specgcc = pkgs.gcc6; | |
fixWrapper = pkgs.runCommand "fix-wrapper" {} '' | |
mkdir -p $out/bin | |
for i in ${specgcc.cc}/bin/*-gnu-gcc*; do | |
ln -s ${specgcc}/bin/gcc $out/bin/$(basename "$i") | |
done | |
for i in ${specgcc.cc}/bin/*-gnu-{g++,c++}*; do | |
ln -s ${specgcc}/bin/g++ $out/bin/$(basename "$i") | |
done | |
''; | |
fhs = pkgs.buildFHSUserEnv { | |
name = "spec-env"; | |
targetPkgs = pkgs: with pkgs; [ | |
(hiPrio specgcc) | |
perl gnumake gfortran gnutar which fixWrapper binutils | |
]; | |
multiPkgs = null; | |
extraOutputsToInstall = [ "dev" ]; | |
profile = '' | |
export hardeningDisable=all | |
''; | |
}; | |
in fhs.env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment