Remove top-level ldcBootstrap
This commit is contained in:
parent
4c538d022d
commit
0b23e4e5b7
|
@ -1,10 +1,8 @@
|
|||
{ bootstrapVersion ? false
|
||||
, version
|
||||
, ldcSha256
|
||||
}:
|
||||
{ version, ldcSha256 }:
|
||||
{ stdenv, fetchurl, cmake, ninja, llvm_5, llvm_8, curl, tzdata
|
||||
, libconfig, lit, gdb, unzip, darwin, bash, ldcBootstrap
|
||||
, libconfig, lit, gdb, unzip, darwin, bash
|
||||
, callPackage, makeWrapper, runCommand, targetPackages
|
||||
, ldcBootstrap ? callPackage ./bootstrap.nix { }
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -14,8 +12,6 @@ let
|
|||
echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile
|
||||
'';
|
||||
|
||||
bootstrapLdc = if bootstrapVersion then null else ldcBootstrap;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -35,8 +31,7 @@ stdenv.mkDerivation rec {
|
|||
postUnpack = ''
|
||||
patchShebangs .
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion) ''
|
||||
+ ''
|
||||
rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d
|
||||
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d
|
||||
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d
|
||||
|
@ -44,8 +39,7 @@ stdenv.mkDerivation rec {
|
|||
# test depends on current year
|
||||
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ddocYear.d
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# https://github.com/NixOS/nixpkgs/issues/34817
|
||||
rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall
|
||||
'';
|
||||
|
@ -54,44 +48,31 @@ stdenv.mkDerivation rec {
|
|||
# Setting SHELL=$SHELL when dmd testsuite is run doesn't work on Linux somehow
|
||||
substituteInPlace tests/d2/dmd-testsuite/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isLinux) ''
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace runtime/phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
# TODO Remove with version > 0.17.6
|
||||
substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ninja makeWrapper unzip ]
|
||||
++ stdenv.lib.optionals (!bootstrapVersion) [
|
||||
bootstrapLdc lit lit.python
|
||||
nativeBuildInputs = [
|
||||
cmake ninja makeWrapper unzip ldcBootstrap lit lit.python
|
||||
]
|
||||
++ stdenv.lib.optional (!bootstrapVersion && stdenv.hostPlatform.isDarwin)
|
||||
++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Foundation
|
||||
# https://github.com/NixOS/nixpkgs/issues/57120
|
||||
# https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515
|
||||
llvm_5
|
||||
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin)
|
||||
]
|
||||
++ stdenv.lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
llvm_8
|
||||
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin)
|
||||
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
|
||||
gdb
|
||||
++ stdenv.lib.optionals (bootstrapVersion) [
|
||||
libconfig llvm_5
|
||||
]
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin
|
||||
darwin.apple_sdk.frameworks.Foundation;
|
||||
];
|
||||
|
||||
buildInputs = [ curl tzdata ];
|
||||
|
||||
cmakeFlags = stdenv.lib.optionals (!bootstrapVersion) [
|
||||
cmakeFlags = [
|
||||
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}"
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
];
|
||||
|
@ -125,9 +106,7 @@ stdenv.mkDerivation rec {
|
|||
additionalExceptions = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin
|
||||
"|druntime-test-shared";
|
||||
|
||||
doCheck = !bootstrapVersion;
|
||||
|
||||
checkPhase = stdenv.lib.optionalString doCheck ''
|
||||
checkPhase = ''
|
||||
# Build default lib test runners
|
||||
ninja -j$NIX_BUILD_CORES all-test-runners
|
||||
|
||||
|
|
|
@ -4554,7 +4554,6 @@ in
|
|||
|
||||
lalezar-fonts = callPackage ../data/fonts/lalezar-fonts { };
|
||||
|
||||
ldcBootstrap = callPackage ../development/compilers/ldc/bootstrap.nix { };
|
||||
ldc = callPackage ../development/compilers/ldc { };
|
||||
|
||||
lbreakout2 = callPackage ../games/lbreakout2 { };
|
||||
|
|
Loading…
Reference in New Issue