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
This commit is contained in:
commit
9fac2254b2
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchFromGitHub
|
{ stdenv, fetchFromGitHub
|
||||||
, makeWrapper, unzip, which
|
, makeWrapper, unzip, which
|
||||||
, curl, tzdata, gdb, darwin
|
, curl, tzdata, gdb, darwin, git
|
||||||
, callPackage, targetPackages, ldc
|
, callPackage, targetPackages, ldc
|
||||||
, version ? "2.083.1"
|
, version ? "2.084.0"
|
||||||
, dmdSha256 ? "0b52yq7slgbrawb22kib9bk2x9xjiy6axwz1317fck5axl093d90"
|
, dmdSha256 ? "1v61spdamncl8c1bzjc19b03p4jl0ih5zq9b7cqsy9ix7qaxmikf"
|
||||||
, druntimeSha256 ? "1hm9p59ih21yv8x7cqjhkyy94677q4f8wk9fs9i1rybx8x19njyn"
|
, druntimeSha256 ? "0vp414j6s11l9s54v81np49mv60ywmd7nnk41idkbwrq0nz4sfrq"
|
||||||
, phobosSha256 ? "1zmz0f1wj0dgxy2cy63ljjc1sl2sgb7ij8bamlxw9nxrchwi3l43"
|
, phobosSha256 ? "1wp7z1x299b0w9ny1ah2wrfhrs05vc4bk51csgw9774l3dqcnv53"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -42,50 +42,22 @@ let
|
|||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
# https://issues.dlang.org/show_bug.cgi?id=19553
|
||||||
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
|
||||||
# Remove cppa test for now because it doesn't work.
|
|
||||||
rm dmd/test/runnable/cppa.d
|
|
||||||
rm dmd/test/runnable/extra-files/cppb.cpp
|
|
||||||
''
|
|
||||||
|
|
||||||
+ stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
|
||||||
rm dmd/test/runnable/test16096.sh
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Compile with PIC to prevent colliding modules with binutils 2.28.
|
|
||||||
# https://issues.dlang.org/show_bug.cgi?id=17375
|
|
||||||
usePIC = "-fPIC";
|
|
||||||
|
|
||||||
phobosPatches = ''
|
|
||||||
# Ugly hack so the dlopen call has a chance to succeed.
|
|
||||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
|
||||||
substituteInPlace phobos/std/net/curl.d \
|
|
||||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
|
||||||
|
|
||||||
# phobos uses curl, so we need to patch the path to the lib.
|
|
||||||
substituteInPlace phobos/posix.mak \
|
|
||||||
--replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace druntime/test/common.mak \
|
substituteInPlace dmd/test/compilable/extra-files/ddocYear.html \
|
||||||
--replace "DFLAGS:=" "DFLAGS:=${usePIC} "
|
--replace "2018" "__YEAR__"
|
||||||
|
|
||||||
substituteInPlace dmd/src/posix.mak \
|
substituteInPlace dmd/test/runnable/test16096.sh \
|
||||||
--replace "DFLAGS :=" "DFLAGS += -link-defaultlib-shared=false"
|
--replace "{EXT}" "{EXE}"
|
||||||
''
|
|
||||||
|
|
||||||
+ phobosPatches
|
|
||||||
|
|
||||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
||||||
substituteInPlace dmd/posix.mak \
|
|
||||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ ldc makeWrapper unzip which gdb ]
|
nativeBuildInputs = [ ldc makeWrapper unzip which gdb git ]
|
||||||
|
|
||||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
Foundation
|
Foundation
|
||||||
@ -109,7 +81,8 @@ 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
|
||||||
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)"
|
echo ${curl.out}/lib/libcurl.so > 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)"
|
||||||
cd ..
|
cd ..
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -119,7 +92,7 @@ let
|
|||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
cd dmd
|
cd dmd
|
||||||
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 DMD=${pathToDmd} BUILD=release SHARED=0 SHELL=$SHELL
|
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHARED=0 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 ..
|
cd ..
|
||||||
@ -194,15 +167,14 @@ let
|
|||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
postPatch = dmdBuild.phobosPatches;
|
|
||||||
|
|
||||||
nativeBuildInputs = dmdBuild.nativeBuildInputs;
|
nativeBuildInputs = dmdBuild.nativeBuildInputs;
|
||||||
buildInputs = dmdBuild.buildInputs;
|
buildInputs = dmdBuild.buildInputs;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd phobos
|
cd phobos
|
||||||
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
|
echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
|
||||||
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)"
|
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 = ''
|
installPhase = ''
|
||||||
|
@ -4,7 +4,7 @@ let
|
|||||||
|
|
||||||
dubBuild = stdenv.mkDerivation rec {
|
dubBuild = stdenv.mkDerivation rec {
|
||||||
name = "dubBuild-${version}";
|
name = "dubBuild-${version}";
|
||||||
version = "1.12.1";
|
version = "1.13.0";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ let
|
|||||||
owner = "dlang";
|
owner = "dlang";
|
||||||
repo = "dub";
|
repo = "dub";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0q4968vxgfxhq6ywhdvj6sqddwf7aadqmmpfqc6nl65r7jyga52a";
|
sha256 = "1wd5pdnbaafj33bbg188w0iz28ps4cyjangb12g2s9dyic29zjqv";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "dtools-${version}";
|
name = "dtools-${version}";
|
||||||
version = "2.083.1";
|
version = "2.084.0";
|
||||||
|
|
||||||
srcs = [
|
srcs = [
|
||||||
(fetchFromGitHub {
|
(fetchFromGitHub {
|
||||||
owner = "dlang";
|
owner = "dlang";
|
||||||
repo = "dmd";
|
repo = "dmd";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0b52yq7slgbrawb22kib9bk2x9xjiy6axwz1317fck5axl093d90";
|
sha256 = "1v61spdamncl8c1bzjc19b03p4jl0ih5zq9b7cqsy9ix7qaxmikf";
|
||||||
name = "dmd";
|
name = "dmd";
|
||||||
})
|
})
|
||||||
(fetchFromGitHub {
|
(fetchFromGitHub {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{ stdenv, fetchgit, dmd, dub }:
|
{ stdenv, fetchgit, dmd, dub }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "Literate-2018-12-23";
|
name = "Literate-2019-01-08";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/zyedidia/Literate.git";
|
url = "https://github.com/zyedidia/Literate.git";
|
||||||
rev = "99a0b7dd1ac451c2386094be06364df9386c3862";
|
rev = "e20c5c86713701d4d17fd2881779d758a27a3e5a";
|
||||||
sha256 = "0jvciajr33iz049m0yal41mz9p8nxmwkpq2mrfhg1ysx2zv3q3pm";
|
sha256 = "1pr7iipcnp6jxi13341p5b3szdrvs7aixpfbwifj6lgbb45vg9sm";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ dmd dub ];
|
buildInputs = [ dmd dub ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user