nim: fix build on aarch64-darwin
This commit is contained in:
parent
acbdea4b15
commit
43cc2746c6
|
@ -74,7 +74,7 @@ let
|
||||||
|
|
||||||
bootstrapCompiler = stdenv.mkDerivation {
|
bootstrapCompiler = stdenv.mkDerivation {
|
||||||
pname = "nim-bootstrap";
|
pname = "nim-bootstrap";
|
||||||
inherit (nim-unwrapped) version src;
|
inherit (nim-unwrapped) version src preBuild;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
@ -118,12 +118,14 @@ in {
|
||||||
"-d:useGnuReadline"
|
"-d:useGnuReadline"
|
||||||
] ++ lib.optional (stdenv.isDarwin || stdenv.isLinux) "-d:nativeStacktrace";
|
] ++ lib.optional (stdenv.isDarwin || stdenv.isLinux) "-d:nativeStacktrace";
|
||||||
|
|
||||||
|
preBuild = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
||||||
|
substituteInPlace makefile \
|
||||||
|
--replace "aarch64" "arm64"
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
local HOME=$TMPDIR
|
local HOME=$TMPDIR
|
||||||
'' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
|
||||||
sed -i "s/aarch64/arm64/g" makefile
|
|
||||||
'' + ''
|
|
||||||
./bin/nim c --parallelBuild:$NIX_BUILD_CORES koch
|
./bin/nim c --parallelBuild:$NIX_BUILD_CORES koch
|
||||||
./koch boot $kochArgs --parallelBuild:$NIX_BUILD_CORES
|
./koch boot $kochArgs --parallelBuild:$NIX_BUILD_CORES
|
||||||
./koch toolsNoExternal $kochArgs --parallelBuild:$NIX_BUILD_CORES
|
./koch toolsNoExternal $kochArgs --parallelBuild:$NIX_BUILD_CORES
|
||||||
|
|
Loading…
Reference in a new issue