Merge pull request #44904 from ThomasMader/dlang-update

Dlang update
This commit is contained in:
Jörg Thalheim
2018-08-16 08:06:55 +02:00
committed by GitHub
4 changed files with 143 additions and 200 deletions

View File

@@ -4,7 +4,7 @@ let
dubBuild = stdenv.mkDerivation rec {
name = "dubBuild-${version}";
version = "1.8.1";
version = "1.10.0";
enableParallelBuilding = true;
@@ -12,7 +12,7 @@ let
owner = "dlang";
repo = "dub";
rev = "v${version}";
sha256 = "16r7x4jsfv5fjssvs6mwj8ymr6fjpvbkjhpr4f4368sjr5iyfad6";
sha256 = "02xxpfcjs427jqbwz0vh5vl3bh62ys65zmi9gpa3svzqffyx13n4";
};
postUnpack = ''
@@ -51,40 +51,45 @@ let
# Need to test in a fixed-output derivation, otherwise the
# network tests would fail if sandbox mode is enabled.
dubUnittests = stdenv.mkDerivation rec {
name = "dubUnittests-${version}";
version = dubBuild.version;
# 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;
enableParallelBuilding = dubBuild.enableParallelBuilding;
preferLocalBuild = true;
inputString = dubBuild.outPath;
outputHashAlgo = "sha256";
outputHash = builtins.hashString "sha256" inputString;
src = dubBuild.src;
postUnpack = dubBuild.postUnpack;
postPatch = dubBuild.postPatch;
src = dubBuild.src;
postUnpack = dubBuild.postUnpack;
postPatch = dubBuild.postPatch;
nativeBuildInputs = dubBuild.nativeBuildInputs;
buildInputs = dubBuild.buildInputs;
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
'';
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
'';
};
installPhase = ''
echo -n $inputString > $out
'';
}
else
"";
in

View File

@@ -2,21 +2,21 @@
stdenv.mkDerivation rec {
name = "dtools-${version}";
version = "2.079.1";
version = "2.081.1";
srcs = [
(fetchFromGitHub {
owner = "dlang";
repo = "dmd";
rev = "v${version}";
sha256 = "0mlk095aw94d940qkymfp85daggiz3f0xv598nlc7acgp6408kyj";
sha256 = "1xdz7p0pdzwkn57ai93mavgdkd8xb1sr2brlc6y3c12x84h43s8z";
name = "dmd";
})
(fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${version}";
sha256 = "0fvpfwh3bh3fymrmis3n39x9hkfklmv81lrlqcyl8fmmk694yvad";
sha256 = "1sbcfj8r1nvy7ynh9dy55q9bvfvxwf1z3llpxckvi8p6yvf35qn2";
name = "dtools";
})
];