ldc: fix for structured attrs
This commit is contained in:
parent
cbbba87b98
commit
a012d5eebb
@ -76,47 +76,31 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja makeWrapper unzip ]
|
nativeBuildInputs = [ cmake ninja makeWrapper unzip ]
|
||||||
|
++ stdenv.lib.optionals (!bootstrapVersion) [
|
||||||
++ stdenv.lib.optional (!bootstrapVersion) [
|
|
||||||
bootstrapLdc python lit
|
bootstrapLdc python lit
|
||||||
]
|
]
|
||||||
|
++ stdenv.lib.optional (!bootstrapVersion && stdenv.hostPlatform.isDarwin)
|
||||||
++ stdenv.lib.optional (!bootstrapVersion && stdenv.hostPlatform.isDarwin) [
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/57120
|
# https://github.com/NixOS/nixpkgs/issues/57120
|
||||||
# https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515
|
# https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515
|
||||||
llvm_5
|
llvm_5
|
||||||
]
|
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin)
|
||||||
|
|
||||||
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
|
|
||||||
llvm_8
|
llvm_8
|
||||||
]
|
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin)
|
||||||
|
|
||||||
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
|
|
||||||
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
|
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
|
||||||
gdb
|
gdb
|
||||||
]
|
++ stdenv.lib.optionals (bootstrapVersion) [
|
||||||
|
|
||||||
++ stdenv.lib.optional (bootstrapVersion) [
|
|
||||||
libconfig llvm_5
|
libconfig llvm_5
|
||||||
]
|
]
|
||||||
|
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin
|
||||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
darwin.apple_sdk.frameworks.Foundation;
|
||||||
Foundation
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
buildInputs = [ curl tzdata ];
|
buildInputs = [ curl tzdata ];
|
||||||
|
|
||||||
cmakeFlagsString = stdenv.lib.optionalString (!bootstrapVersion) ''
|
cmakeFlags = stdenv.lib.optionals (!bootstrapVersion) [
|
||||||
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J$PWD"
|
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J$PWD"
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
'';
|
];
|
||||||
|
|
||||||
preConfigure = stdenv.lib.optionalString (!bootstrapVersion) ''
|
|
||||||
cmakeFlagsArray=(
|
|
||||||
${cmakeFlagsString}
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
export DMD=$PWD/bin/ldmd2
|
export DMD=$PWD/bin/ldmd2
|
||||||
@ -124,7 +108,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
makeFlags = [ "DMD=$DMD" ];
|
makeFlags = [ "DMD=$DMD" ];
|
||||||
|
|
||||||
fixNames = if stdenv.hostPlatform.isDarwin then ''
|
fixNames = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
fixDarwinDylibNames() {
|
fixDarwinDylibNames() {
|
||||||
local flags=()
|
local flags=()
|
||||||
|
|
||||||
@ -141,15 +125,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib")
|
fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib")
|
||||||
export DYLD_LIBRARY_PATH=$(pwd)/lib
|
export DYLD_LIBRARY_PATH=$(pwd)/lib
|
||||||
''
|
'';
|
||||||
else
|
|
||||||
"";
|
|
||||||
|
|
||||||
# https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746
|
# https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746
|
||||||
additionalExceptions = if stdenv.hostPlatform.isDarwin then
|
additionalExceptions = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin
|
||||||
"|druntime-test-shared"
|
"|druntime-test-shared";
|
||||||
else
|
|
||||||
"";
|
|
||||||
|
|
||||||
doCheck = !bootstrapVersion;
|
doCheck = !bootstrapVersion;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user