git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #53666 from ThomasMader/dlang-update

dmd: 2.083.1 -> 2.084.0, dub: 1.12.1 -> 1.13.0, dtools: 2.083.1 -> 2.084.0, Literate: 2018-12-23 -> 2019-01-08

commit9fac2254b2e0896b24de0abfe86d489f73b09b1e authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateThu 10 Jan 2019, 13:54 (8 years ago) parentd7cedf7205dd43
4 files changed+25−53
pkgs/development/compilers/dmd/default.nix+18−46 pkgs/development/tools/build-managers/dub/default.nix+2−2 pkgs/development/tools/dtools/default.nix+2−2 pkgs/development/tools/literate-programming/Literate/default.nix+3−3
pkgs/development/compilers/dmd/default.nix+18−46
@@ -1,11 +1,11 @@
11{ stdenv, fetchFromGitHub
22, makeWrapper, unzip, which
3−, curl, tzdata, gdb, darwin
3+, curl, tzdata, gdb, darwin, git
44, callPackage, targetPackages, ldc
5−, version ? "2.083.1"
6−, dmdSha256 ? "0b52yq7slgbrawb22kib9bk2x9xjiy6axwz1317fck5axl093d90"
7−, druntimeSha256 ? "1hm9p59ih21yv8x7cqjhkyy94677q4f8wk9fs9i1rybx8x19njyn"
8−, phobosSha256 ? "1zmz0f1wj0dgxy2cy63ljjc1sl2sgb7ij8bamlxw9nxrchwi3l43"
5+, version ? "2.084.0"
6+, dmdSha256 ? "1v61spdamncl8c1bzjc19b03p4jl0ih5zq9b7cqsy9ix7qaxmikf"
7+, druntimeSha256 ? "0vp414j6s11l9s54v81np49mv60ywmd7nnk41idkbwrq0nz4sfrq"
8+, phobosSha256 ? "1wp7z1x299b0w9ny1ah2wrfhrs05vc4bk51csgw9774l3dqcnv53"
99}:
1010
1111let
@@ -42,50 +42,22 @@ let
4242
4343 sourceRoot = ".";
4444
45+ # https://issues.dlang.org/show_bug.cgi?id=19553
46+ hardeningDisable = [ "fortify" ];
47+
4548 postUnpack = ''
4649 patchShebangs .
47−
48− # Remove cppa test for now because it doesn't work.
49− rm dmd/test/runnable/cppa.d
50− rm dmd/test/runnable/extra-files/cppb.cpp
51− ''
52−
53− + stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin) ''
54− rm dmd/test/runnable/test16096.sh
55− '';
56−
57− # Compile with PIC to prevent colliding modules with binutils 2.28.
58− # https://issues.dlang.org/show_bug.cgi?id=17375
59− usePIC = "-fPIC";
60−
61− phobosPatches = ''
62− # Ugly hack so the dlopen call has a chance to succeed.
63− # https://issues.dlang.org/show_bug.cgi?id=15391
64− substituteInPlace phobos/std/net/curl.d \
65− --replace libcurl.so ${curl.out}/lib/libcurl.so
66−
67− # phobos uses curl, so we need to patch the path to the lib.
68− substituteInPlace phobos/posix.mak \
69− --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
70−
7150 '';
7251
7352 postPatch = ''
74− substituteInPlace druntime/test/common.mak \
75− --replace "DFLAGS:=" "DFLAGS:=${usePIC} "
76−
77− substituteInPlace dmd/src/posix.mak \
78− --replace "DFLAGS :=" "DFLAGS += -link-defaultlib-shared=false"
79− ''
53+ substituteInPlace dmd/test/compilable/extra-files/ddocYear.html \
54+ --replace "2018" "__YEAR__"
8055
81− + phobosPatches
82−
83− + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
84− substituteInPlace dmd/posix.mak \
85− --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
56+ substituteInPlace dmd/test/runnable/test16096.sh \
57+ --replace "{EXT}" "{EXE}"
8658 '';
8759
88− nativeBuildInputs = [ ldc makeWrapper unzip which gdb ]
60+ nativeBuildInputs = [ ldc makeWrapper unzip which gdb git ]
8961
9062 ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
9163 Foundation
@@ -109,7 +81,8 @@ let
10981 make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
11082 cd ../phobos
11183 echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
112− make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -J$(pwd)"
84+ echo ${curl.out}/lib/libcurl.so > LibcurlPathFile
85+ 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)"
11386 cd ..
11487 '';
11588
@@ -119,7 +92,7 @@ let
11992
12093 checkPhase = ''
12194 cd dmd
122− make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 DMD=${pathToDmd} BUILD=release SHARED=0 SHELL=$SHELL
95+ make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHARED=0 SHELL=$SHELL
12396 cd ../druntime
12497 make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
12598 cd ..
@@ -194,15 +167,14 @@ let
194167
195168 sourceRoot = ".";
196169
197− postPatch = dmdBuild.phobosPatches;
198−
199170 nativeBuildInputs = dmdBuild.nativeBuildInputs;
200171 buildInputs = dmdBuild.buildInputs;
201172
202173 buildPhase = ''
203174 cd phobos
204175 echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
205− make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${dmdBuild}/bin/dmd DFLAGS="-version=TZDatabaseDir -J$(pwd)"
176+ echo ${curl.out}/lib/libcurl.so > LibcurlPathFile
177+ 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)"
206178 '';
207179
208180 installPhase = ''
pkgs/development/tools/build-managers/dub/default.nix+2−2
@@ -4,7 +4,7 @@ let
44
55 dubBuild = stdenv.mkDerivation rec {
66 name = "dubBuild-${version}";
7− version = "1.12.1";
7+ version = "1.13.0";
88
99 enableParallelBuilding = true;
1010
@@ -12,7 +12,7 @@ let
1212 owner = "dlang";
1313 repo = "dub";
1414 rev = "v${version}";
15− sha256 = "0q4968vxgfxhq6ywhdvj6sqddwf7aadqmmpfqc6nl65r7jyga52a";
15+ sha256 = "1wd5pdnbaafj33bbg188w0iz28ps4cyjangb12g2s9dyic29zjqv";
1616 };
1717
1818 postUnpack = ''
pkgs/development/tools/dtools/default.nix+2−2
@@ -2,14 +2,14 @@
22
33stdenv.mkDerivation rec {
44 name = "dtools-${version}";
5− version = "2.083.1";
5+ version = "2.084.0";
66
77 srcs = [
88 (fetchFromGitHub {
99 owner = "dlang";
1010 repo = "dmd";
1111 rev = "v${version}";
12− sha256 = "0b52yq7slgbrawb22kib9bk2x9xjiy6axwz1317fck5axl093d90";
12+ sha256 = "1v61spdamncl8c1bzjc19b03p4jl0ih5zq9b7cqsy9ix7qaxmikf";
1313 name = "dmd";
1414 })
1515 (fetchFromGitHub {
pkgs/development/tools/literate-programming/Literate/default.nix+3−3
@@ -1,12 +1,12 @@
11{ stdenv, fetchgit, dmd, dub }:
22
33stdenv.mkDerivation {
4− name = "Literate-2018-12-23";
4+ name = "Literate-2019-01-08";
55
66 src = fetchgit {
77 url = "https://github.com/zyedidia/Literate.git";
8− rev = "99a0b7dd1ac451c2386094be06364df9386c3862";
9− sha256 = "0jvciajr33iz049m0yal41mz9p8nxmwkpq2mrfhg1ysx2zv3q3pm";
8+ rev = "e20c5c86713701d4d17fd2881779d758a27a3e5a";
9+ sha256 = "1pr7iipcnp6jxi13341p5b3szdrvs7aixpfbwifj6lgbb45vg9sm";
1010 };
1111
1212 buildInputs = [ dmd dub ];