dmd,dtools,dub: 2.079.0 -> 2.079.1

This commit is contained in:
Thomas Mader 2018-04-14 12:56:34 +02:00
parent 893ba5d1b8
commit e762dca831
3 changed files with 18 additions and 12 deletions

View File

@ -1,12 +1,12 @@
{ stdenv, fetchFromGitHub, overrideCC, gcc5 { stdenv, fetchFromGitHub, overrideCC, gcc5
, makeWrapper, unzip, which , makeWrapper, unzip, which
, curl, tzdata, gdb, darwin , curl, tzdata, gdb, darwin
, callPackage , callPackage, targetPackages
, bootstrapVersion ? false , bootstrapVersion ? false
, version ? "2.079.0" , version ? "2.079.1"
, dmdSha256 ? "1k6cky71pqnss6h6391p1ich2mjs598f5fda018aygnxg87qgh4y" , dmdSha256 ? "0mlk095aw94d940qkymfp85daggiz3f0xv598nlc7acgp6408kyj"
, druntimeSha256 ? "183pqygj5w4105czs5kswyjn9mrcybx3wmkynz3in0m3ylzzjmvl" , druntimeSha256 ? "18r8gwvb54ar80j5155wx0qbqq4w56hqmbf6wap20xwijg2rw90g"
, phobosSha256 ? "0y9i86ggmf41ww2xk2bsrlsv9b1blj5dbyan6q6r6xp8dmgrd79w" , phobosSha256 ? "1x5v1ln51nr8x2vyki864160bakdyq0acmvbfv7jcipaj2w3m9bb"
}: }:
let let
@ -143,6 +143,9 @@ let
+ stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) '' + stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
substituteInPlace ${dmdPath}/root/port.c \ substituteInPlace ${dmdPath}/root/port.c \
--replace "#include <bits/mathdef.h>" "#include <complex.h>" --replace "#include <bits/mathdef.h>" "#include <complex.h>"
substituteInPlace ${dmdPath}/root/port.c \
--replace "#include <bits/nan.h>" "#include <math.h>"
'' ''
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
@ -198,6 +201,8 @@ let
extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}";
dontStrip = true;
installPhase = '' installPhase = ''
cd dmd cd dmd
mkdir $out mkdir $out
@ -222,13 +227,13 @@ let
cp -r etc $out/include/d2 cp -r etc $out/include/d2
wrapProgram $out/bin/dmd \ wrapProgram $out/bin/dmd \
--prefix PATH ":" "${stdenv.cc}/bin" \ --prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \
--set-default CC "$CC" --set-default CC "${targetPackages.stdenv.cc}/bin/cc"
cd $out/bin cd $out/bin
tee dmd.conf << EOF tee dmd.conf << EOF
[Environment] [Environment]
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
EOF EOF
''; '';

View File

@ -4,7 +4,7 @@ let
dubBuild = stdenv.mkDerivation rec { dubBuild = stdenv.mkDerivation rec {
name = "dubBuild-${version}"; name = "dubBuild-${version}";
version = "1.8.0"; version = "1.8.1";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -12,7 +12,7 @@ let
owner = "dlang"; owner = "dlang";
repo = "dub"; repo = "dub";
rev = "v${version}"; rev = "v${version}";
sha256 = "0788d375sc6xdak9x6xclkkz243lb7di68yxfvl4v0n178mi22bk"; sha256 = "16r7x4jsfv5fjssvs6mwj8ymr6fjpvbkjhpr4f4368sjr5iyfad6";
}; };
postUnpack = '' postUnpack = ''
@ -75,6 +75,7 @@ let
# file under ../etc relative to the dub location. # file under ../etc relative to the dub location.
cp ${dubBuild}/bin/dub bin/ cp ${dubBuild}/bin/dub bin/
export DUB=$NIX_BUILD_TOP/source/bin/dub export DUB=$NIX_BUILD_TOP/source/bin/dub
export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
export DC=${dmd.out}/bin/dmd export DC=${dmd.out}/bin/dmd
export HOME=$TMP export HOME=$TMP
./test/run-unittest.sh ./test/run-unittest.sh

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dtools-${version}"; name = "dtools-${version}";
version = "2.079.0"; version = "2.079.1";
srcs = [ srcs = [
(fetchFromGitHub { (fetchFromGitHub {
owner = "dlang"; owner = "dlang";
repo = "dmd"; repo = "dmd";
rev = "v${version}"; rev = "v${version}";
sha256 = "1k6cky71pqnss6h6391p1ich2mjs598f5fda018aygnxg87qgh4y"; sha256 = "0mlk095aw94d940qkymfp85daggiz3f0xv598nlc7acgp6408kyj";
name = "dmd"; name = "dmd";
}) })
(fetchFromGitHub { (fetchFromGitHub {