3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #55998 from ThomasMader/dlang-update

Dlang update
This commit is contained in:
Dmitry Kalinkin 2019-02-22 02:29:41 -05:00 committed by GitHub
commit f96d4d555b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 354 additions and 471 deletions

View file

@ -1,17 +1,28 @@
{ stdenv, fetchFromGitHub { stdenv, lib, fetchFromGitHub, fetchpatch
, makeWrapper, unzip, which , makeWrapper, unzip, which, writeTextFile
, curl, tzdata, gdb, darwin, git , curl, tzdata, gdb, darwin, git
, callPackage, targetPackages, ldc , callPackage, targetPackages, ldc
, version ? "2.084.0" , version ? "2.084.1"
, dmdSha256 ? "1v61spdamncl8c1bzjc19b03p4jl0ih5zq9b7cqsy9ix7qaxmikf" , dmdSha256 ? "10ll5072rkv3ln7i5l88h2f9mzda567kw2jwh6466vm6ylzl4jms"
, druntimeSha256 ? "0vp414j6s11l9s54v81np49mv60ywmd7nnk41idkbwrq0nz4sfrq" , druntimeSha256 ? "0i0g2cnzh097pmvb86gvyj79canaxppw33hp7ylqnd11q4kqc8pb"
, phobosSha256 ? "1wp7z1x299b0w9ny1ah2wrfhrs05vc4bk51csgw9774l3dqcnv53" , phobosSha256 ? "1hxpismj9gy5n1bc9kl9ykgd4lfmkq9i8xgrq09j0fybfwn9j1gc"
}: }:
let let
dmdBuild = stdenv.mkDerivation rec { dmdConfFile = writeTextFile {
name = "dmdBuild-${version}"; name = "dmd.conf";
text = (lib.generators.toINI {} {
"Environment" = {
DFLAGS = ''-I$@out@/include/d2 -L-L$@out@/lib -fPIC ${stdenv.lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}'';
};
});
};
in
stdenv.mkDerivation rec {
name = "dmd-${version}";
inherit version; inherit version;
enableParallelBuilding = true; enableParallelBuilding = true;
@ -40,6 +51,16 @@ let
}) })
]; ];
patches = [
(fetchpatch {
name = "fix-loader-import.patch";
url = "https://github.com/dlang/dmd/commit/e7790436c4af1910b8c079dac9bb69627d7dea4b.patch";
sha256 = "0w69hajx8agywc7m2hph5m27g2yclz8ml0gjjyjk9k6ii3jv45kx";
})
];
patchFlags = [ "--directory=dmd" "-p1" ];
sourceRoot = "."; sourceRoot = ".";
# https://issues.dlang.org/show_bug.cgi?id=19553 # https://issues.dlang.org/show_bug.cgi?id=19553
@ -49,12 +70,12 @@ let
patchShebangs . patchShebangs .
''; '';
postPatch = '' postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace dmd/test/compilable/extra-files/ddocYear.html \ substituteInPlace phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
--replace "2018" "__YEAR__" ''
substituteInPlace dmd/test/runnable/test16096.sh \ + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
--replace "{EXT}" "{EXE}" substituteInPlace phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
''; '';
nativeBuildInputs = [ ldc makeWrapper unzip which gdb git ] nativeBuildInputs = [ ldc makeWrapper unzip which gdb git ]
@ -81,20 +102,21 @@ let
make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
cd ../phobos cd ../phobos
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
echo ${curl.out}/lib/libcurl.so > LibcurlPathFile echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > LibcurlPathFile
make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)" make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)"
cd .. cd ..
''; '';
# Disable tests on Darwin for now because of
# https://github.com/NixOS/nixpkgs/issues/41099
doCheck = true; doCheck = true;
checkPhase = '' checkPhase = ''
cd dmd cd dmd
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHARED=0 SHELL=$SHELL # https://github.com/NixOS/nixpkgs/pull/55998#issuecomment-465871846
#make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL
cd ../druntime cd ../druntime
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
cd ../phobos
make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)"
cd .. cd ..
''; '';
@ -127,11 +149,7 @@ let
--prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \ --prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \
--set-default CC "${targetPackages.stdenv.cc}/bin/cc" --set-default CC "${targetPackages.stdenv.cc}/bin/cc"
cd $out/bin substitute ${dmdConfFile} "$out/bin/dmd.conf" --subst-var out
tee dmd.conf << EOF
[Environment]
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
EOF
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -143,57 +161,5 @@ let
maintainers = with maintainers; [ ThomasMader ]; maintainers = with maintainers; [ ThomasMader ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
}; };
};
# Need to test Phobos in a fixed-output derivation, otherwise the
# network stuff in Phobos would fail if sandbox mode is enabled.
#
# Disable tests on Darwin for now because of
# https://github.com/NixOS/nixpkgs/issues/41099
phobosUnittests = if !stdenv.hostPlatform.isDarwin then
stdenv.mkDerivation rec {
name = "phobosUnittests-${version}";
version = dmdBuild.version;
enableParallelBuilding = dmdBuild.enableParallelBuilding;
preferLocalBuild = true;
inputString = dmdBuild.outPath;
outputHashAlgo = "sha256";
outputHash = builtins.hashString "sha256" inputString;
srcs = dmdBuild.srcs;
sourceRoot = ".";
nativeBuildInputs = dmdBuild.nativeBuildInputs;
buildInputs = dmdBuild.buildInputs;
buildPhase = ''
cd phobos
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
echo ${curl.out}/lib/libcurl.so > LibcurlPathFile
make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${dmdBuild}/bin/dmd DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)"
'';
installPhase = ''
echo -n $inputString > $out
'';
}
else
"";
in
stdenv.mkDerivation rec {
inherit phobosUnittests;
name = "dmd-${version}";
phases = "installPhase";
buildInputs = dmdBuild.buildInputs;
installPhase = ''
mkdir $out
cp -r --symbolic-link ${dmdBuild}/* $out/
'';
meta = dmdBuild.meta;
} }

View file

@ -2,8 +2,8 @@
, python, libconfig, lit, gdb, unzip, darwin, bash , python, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, targetPackages , callPackage, makeWrapper, targetPackages
, bootstrapVersion ? false , bootstrapVersion ? false
, version ? "1.12.0" , version ? "1.14.0"
, ldcSha256 ? "1fdma1w8j37wkr0pqdar11slkk36qymamxnk6d9k8ybhjmxaaawm" , ldcSha256 ? "147vlzzzjx2n6zyz9wj54gj046i1mw5p5wixwzi5wkllgxghyy9c"
}: }:
let let
@ -18,8 +18,10 @@ let
else else
""; "";
ldcBuild = stdenv.mkDerivation rec { in
name = "ldcBuild-${version}";
stdenv.mkDerivation rec {
name = "ldc-${version}";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -28,57 +30,54 @@ let
sha256 = ldcSha256; sha256 = ldcSha256;
}; };
# https://issues.dlang.org/show_bug.cgi?id=19553
hardeningDisable = [ "fortify" ];
postUnpack = '' postUnpack = ''
patchShebangs . patchShebangs .
'' ''
+ stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) '' + stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
# http://forum.dlang.org/thread/xtbbqthxutdoyhnxjhxl@forum.dlang.org
rm -r ldc-${version}-src/tests/dynamiccompile
# https://github.com/NixOS/nixpkgs/issues/34817 # https://github.com/NixOS/nixpkgs/issues/34817
rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
rm -r ldc-${version}-src/tests/debuginfo/classtypes_gdb.d
rm -r ldc-${version}-src/tests/debuginfo/nested_gdb.d
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/test16096.sh
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ldc_output_filenames.sh
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/crlf.sh
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/issue15574.sh
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/test6461.sh
'' ''
+ stdenv.lib.optionalString (!bootstrapVersion) '' + stdenv.lib.optionalString (!bootstrapVersion) ''
echo ${tzdata}/share/zoneinfo/ > ldc-${version}-src/TZDatabaseDirFile echo ${tzdata}/share/zoneinfo/ > ldc-${version}-src/TZDatabaseDirFile
# Remove cppa test for now because it doesn't work. echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > ldc-${version}-src/LibcurlPathFile
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/cppa.d
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
''; '';
datetimePath = if bootstrapVersion then
"phobos/std/datetime.d"
else
"phobos/std/datetime/timezone.d";
postPatch = '' postPatch = ''
# https://issues.dlang.org/show_bug.cgi?id=15391 # Setting SHELL=$SHELL when dmd testsuite is run doesn't work on Linux somehow
substituteInPlace runtime/phobos/std/net/curl.d \ substituteInPlace tests/d2/dmd-testsuite/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
--replace libcurl.so ${curl.out}/lib/libcurl.so ''
substituteInPlace tests/d2/dmd-testsuite/Makefile \ + stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isLinux) ''
--replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash" substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
''
+ stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
substituteInPlace runtime/phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
'' ''
+ stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isDarwin) '' + stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
# Was not able to compile on darwin due to "__inline_isnanl" # Was not able to compile on darwin due to "__inline_isnanl"
# being undefined. # being undefined.
# TODO Remove with version > 0.17.6
substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
''; '';
nativeBuildInputs = [ cmake makeWrapper llvm bootstrapLdc python lit gdb unzip ] nativeBuildInputs = [ cmake makeWrapper llvm unzip ]
++ stdenv.lib.optional (!bootstrapVersion) [
bootstrapLdc python lit
]
++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
gdb
]
++ stdenv.lib.optional (bootstrapVersion) [ ++ stdenv.lib.optional (bootstrapVersion) [
libconfig libconfig
@ -91,17 +90,9 @@ let
buildInputs = [ curl tzdata ]; buildInputs = [ curl tzdata ];
#"-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc"
# Xcode 9.0.1 fixes that bug according to ldc release notes
#"-DRT_ARCHIVE_WITH_LDC=OFF"
#"-DD_FLAGS=TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/"
#"-DCMAKE_BUILD_TYPE=Release"
#"-DCMAKE_SKIP_RPATH=ON"
#-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc
#
cmakeFlagsString = stdenv.lib.optionalString (!bootstrapVersion) '' cmakeFlagsString = stdenv.lib.optionalString (!bootstrapVersion) ''
"-DD_FLAGS=-d-version=TZDatabaseDir;-J$PWD" "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J$PWD"
"-DCMAKE_BUILD_TYPE=Release"
''; '';
preConfigure = stdenv.lib.optionalString (!bootstrapVersion) '' preConfigure = stdenv.lib.optionalString (!bootstrapVersion) ''
@ -116,15 +107,52 @@ let
makeFlags = [ "DMD=$DMD" ]; makeFlags = [ "DMD=$DMD" ];
fixNames = if stdenv.hostPlatform.isDarwin then ''
fixDarwinDylibNames() {
local flags=()
for fn in "$@"; do
flags+=(-change "$(basename "$fn")" "$fn")
done
for fn in "$@"; do
if [ -L "$fn" ]; then continue; fi
echo "$fn: fixing dylib"
install_name_tool -id "$fn" "''${flags[@]}" "$fn"
done
}
fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib")
''
else
"";
# https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746
additionalExceptions = if stdenv.hostPlatform.isDarwin then
"|druntime-test-shared"
else
"";
doCheck = !bootstrapVersion; doCheck = !bootstrapVersion;
checkPhase = '' checkPhase = stdenv.lib.optionalString doCheck ''
# Build default lib test runners
make -j$NIX_BUILD_CORES all-test-runners
${fixNames}
# Run dmd testsuite
export DMD_TESTSUITE_MAKE_ARGS="-j$NIX_BUILD_CORES DMD=$DMD CC=$CXX"
ctest -V -R "dmd-testsuite"
# Build and run LDC D unittests. # Build and run LDC D unittests.
ctest --output-on-failure -R "ldc2-unittest" ctest --output-on-failure -R "ldc2-unittest"
# Run LIT testsuite. # Run LIT testsuite.
ctest -V -R "lit-tests" ctest -V -R "lit-tests"
# Run DMD testsuite.
DMD_TESTSUITE_MAKE_ARGS=-j$NIX_BUILD_CORES ctest -V -R "dmd-testsuite" # Run default lib unittests
ctest -j$NIX_BUILD_CORES --output-on-failure -E "ldc2-unittest|lit-tests|dmd-testsuite${additionalExceptions}"
''; '';
postInstall = '' postInstall = ''
@ -141,85 +169,5 @@ let
maintainers = with maintainers; [ ThomasMader ]; maintainers = with maintainers; [ ThomasMader ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
}; };
};
# Need to test Phobos in a fixed-output derivation, otherwise the
# network stuff in Phobos would fail if sandbox mode is enabled.
#
# Disable tests on Darwin for now because of
# https://github.com/NixOS/nixpkgs/issues/41099
# https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
ldcUnittests = if (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) then
stdenv.mkDerivation rec {
name = "ldcUnittests-${version}";
enableParallelBuilding = ldcBuild.enableParallelBuilding;
preferLocalBuild = true;
inputString = ldcBuild.outPath;
outputHashAlgo = "sha256";
outputHash = builtins.hashString "sha256" inputString;
src = ldcBuild.src;
postUnpack = ldcBuild.postUnpack;
postPatch = ldcBuild.postPatch;
nativeBuildInputs = ldcBuild.nativeBuildInputs
++ [
ldcBuild
];
buildInputs = ldcBuild.buildInputs;
preConfigure = ''
cmakeFlagsArray=(
${ldcBuild.cmakeFlagsString}
"-DD_COMPILER=${ldcBuild.out}/bin/ldmd2"
)
'';
postConfigure = ldcBuild.postConfigure;
makeFlags = ldcBuild.makeFlags;
buildCmd = if bootstrapVersion then
"ctest -V -R \"build-druntime-ldc-unittest|build-phobos2-ldc-unittest\""
else
"make -j$NIX_BUILD_CORES DMD=${ldcBuild.out}/bin/ldc2 phobos2-test-runner phobos2-test-runner-debug";
testCmd = if bootstrapVersion then
"ctest -j$NIX_BUILD_CORES --output-on-failure -E \"dmd-testsuite|lit-tests|ldc2-unittest|llvm-ir-testsuite\""
else
"ctest -j$NIX_BUILD_CORES --output-on-failure -E \"dmd-testsuite|lit-tests|ldc2-unittest\"";
buildPhase = ''
${buildCmd}
ln -s ${ldcBuild.out}/bin/ldmd2 $PWD/bin/ldmd2
${testCmd}
'';
installPhase = ''
echo -n $inputString > $out
'';
}
else
"";
in
stdenv.mkDerivation rec {
inherit ldcUnittests;
name = "ldc-${version}";
phases = "installPhase";
buildInputs = ldcBuild.buildInputs;
installPhase = ''
mkdir $out
cp -r --symbolic-link ${ldcBuild}/* $out/
'';
meta = ldcBuild.meta;
} }

View file

@ -1,9 +1,7 @@
{ stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }: { stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }:
let stdenv.mkDerivation rec {
name = "dub-${version}";
dubBuild = stdenv.mkDerivation rec {
name = "dubBuild-${version}";
version = "1.13.0"; version = "1.13.0";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -34,6 +32,33 @@ let
./build.sh ./build.sh
''; '';
doCheck = true;
checkPhase = ''
export DUB=$NIX_BUILD_TOP/source/bin/dub
export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
export DC=${dmd.out}/bin/dmd
export HOME=$TMP
rm -rf test/issue502-root-import
rm test/issue990-download-optional-selected.sh
rm test/timeout.sh
rm test/issue674-concurrent-dub.sh
rm test/issue672-upgrade-optional.sh
rm test/issue1574-addcommand.sh
rm test/issue1524-maven-upgrade-dependency-tree.sh
rm test/issue1416-maven-repo-pkg-supplier.sh
rm test/issue1037-better-dependency-messages.sh
rm test/interactive-remove.sh
rm test/fetchzip.sh
rm test/feat663-search.sh
rm test/ddox.sh
rm test/0-init-multi.sh
rm test/0-init-multi-json.sh
./test/run-unittest.sh
'';
installPhase = '' installPhase = ''
mkdir $out mkdir $out
mkdir $out/bin mkdir $out/bin
@ -47,63 +72,5 @@ let
maintainers = with maintainers; [ ThomasMader ]; maintainers = with maintainers; [ ThomasMader ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
}; };
};
# Need to test in a fixed-output derivation, otherwise the
# network tests would fail if sandbox mode is enabled.
# Disable tests on Darwin for now because they don't work
# reliably there.
dubUnittests = if !stdenv.hostPlatform.isDarwin then
stdenv.mkDerivation rec {
name = "dubUnittests-${version}";
version = dubBuild.version;
enableParallelBuilding = dubBuild.enableParallelBuilding;
preferLocalBuild = true;
inputString = dubBuild.outPath;
outputHashAlgo = "sha256";
outputHash = builtins.hashString "sha256" inputString;
src = dubBuild.src;
postUnpack = dubBuild.postUnpack;
postPatch = dubBuild.postPatch;
nativeBuildInputs = dubBuild.nativeBuildInputs;
buildInputs = dubBuild.buildInputs;
buildPhase = ''
# Can't use dub from dubBuild directly because one unittest
# (issue895-local-configuration) needs to generate a config
# file under ../etc relative to the dub location.
cp ${dubBuild}/bin/dub bin/
export DUB=$NIX_BUILD_TOP/source/bin/dub
export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
export DC=${dmd.out}/bin/dmd
export HOME=$TMP
./test/run-unittest.sh
'';
installPhase = ''
echo -n $inputString > $out
'';
}
else
"";
in
stdenv.mkDerivation rec {
inherit dubUnittests;
name = "dub-${dubBuild.version}";
phases = "installPhase";
buildInputs = dubBuild.buildInputs;
installPhase = ''
mkdir $out
cp -r --symbolic-link ${dubBuild}/* $out/
'';
meta = dubBuild.meta;
} }

View file

@ -2,14 +2,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dtools-${version}"; name = "dtools-${version}";
version = "2.084.0"; version = "2.084.1";
srcs = [ srcs = [
(fetchFromGitHub { (fetchFromGitHub {
owner = "dlang"; owner = "dlang";
repo = "dmd"; repo = "dmd";
rev = "v${version}"; rev = "v${version}";
sha256 = "1v61spdamncl8c1bzjc19b03p4jl0ih5zq9b7cqsy9ix7qaxmikf"; sha256 = "10ll5072rkv3ln7i5l88h2f9mzda567kw2jwh6466vm6ylzl4jms";
name = "dmd"; name = "dmd";
}) })
(fetchFromGitHub { (fetchFromGitHub {
@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
postUnpack = '' postUnpack = ''
mv dmd dtools mv dmd dtools
cd dtools cd dtools
substituteInPlace posix.mak --replace "\$(DMD) \$(DFLAGS) -unittest -main -run rdmd.d" ""
''; '';
nativeBuildInputs = [ dmd ]; nativeBuildInputs = [ dmd ];