Merge pull request #34812 from ThomasMader/dlang-update

Dlang update
This commit is contained in:
Joachim F 2018-02-17 09:06:37 +00:00 committed by GitHub
commit 4b43e72af7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 26 deletions

View File

@ -3,9 +3,9 @@
, curl, tzdata, gdb, darwin , curl, tzdata, gdb, darwin
, callPackage , callPackage
, bootstrapVersion ? false , bootstrapVersion ? false
, version ? "2.078.1" , version ? "2.078.2"
, dmdSha256 ? "0b9lphh4g3r9cyzv4wcfppv9j3w952vvwv615za23acgwav3mqg2" , dmdSha256 ? "0x9q4aw4jl36dz7m5111y2sm8jdaj3zg36zhj6vqg1lqpdn3bhls"
, druntimeSha256 ? "16jv40m073cflpkyl0vmg1g58cianybfcsgcvwli7pfryxbgsbrr" , druntimeSha256 ? "0nfqjcmwqc490bzi3582x1c3zigkf306g4nyd1cyd3vs8lfm6x66"
, phobosSha256 ? "08ircpf4ilznz638kra272hz8fi5ccvw2cswj5hqckssl1lyqzs8" , phobosSha256 ? "08ircpf4ilznz638kra272hz8fi5ccvw2cswj5hqckssl1lyqzs8"
}: }:
@ -111,7 +111,7 @@ let
'' ''
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' + stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
# See https://github.com/NixOS/nixpkgs/issues/29443 # See https://github.com/dlang/phobos/pull/5960
substituteInPlace phobos/std/path.d \ substituteInPlace phobos/std/path.d \
--replace "\"/root" "\"${ROOT_HOME_DIR}" --replace "\"/root" "\"${ROOT_HOME_DIR}"
''; '';

View File

@ -4,7 +4,7 @@ let
dubBuild = stdenv.mkDerivation rec { dubBuild = stdenv.mkDerivation rec {
name = "dubBuild-${version}"; name = "dubBuild-${version}";
version = "1.7.1"; version = "1.7.2";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -12,9 +12,13 @@ let
owner = "dlang"; owner = "dlang";
repo = "dub"; repo = "dub";
rev = "v${version}"; rev = "v${version}";
sha256 = "09bcc9bq2z1rbm8sdip1l81y5p8q13r30k02lzifyasiplrnpvlv"; sha256 = "073ibvgm1gphcqs1yjrav9ryp677nh3b194nxmvicwgvdc0sb6w9";
}; };
postUnpack = ''
patchShebangs .
'';
patches = [ patches = [
# TODO Remove with next release which contains https://github.com/dlang/dub/pull/1354 # TODO Remove with next release which contains https://github.com/dlang/dub/pull/1354
(fetchpatch { (fetchpatch {
@ -23,12 +27,11 @@ let
}) })
]; ];
# Can be removed with https://github.com/dlang/dub/pull/1368
dubvar = "\\$DUB";
postPatch = '' postPatch = ''
# Avoid that the version file is overwritten substituteInPlace test/fetchzip.sh \
substituteInPlace build.sh \ --replace "dub remove" "\"${dubvar}\" remove"
--replace source/dub/version_.d /dev/null
patchShebangs .
''; '';
nativeBuildInputs = [ dmd libevent rsync ]; nativeBuildInputs = [ dmd libevent rsync ];
@ -70,6 +73,7 @@ let
patches = dubBuild.patches; patches = dubBuild.patches;
postUnpack = dubBuild.postUnpack;
postPatch = dubBuild.postPatch; postPatch = dubBuild.postPatch;
nativeBuildInputs = dubBuild.nativeBuildInputs; nativeBuildInputs = dubBuild.nativeBuildInputs;

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dtools-${version}"; name = "dtools-${version}";
version = "2.078.1"; version = "2.078.2";
srcs = [ srcs = [
(fetchFromGitHub { (fetchFromGitHub {
owner = "dlang"; owner = "dlang";
repo = "dmd"; repo = "dmd";
rev = "v${version}"; rev = "v${version}";
sha256 = "0b9lphh4g3r9cyzv4wcfppv9j3w952vvwv615za23acgwav3mqg2"; sha256 = "0x9q4aw4jl36dz7m5111y2sm8jdaj3zg36zhj6vqg1lqpdn3bhls";
name = "dmd"; name = "dmd";
}) })
(fetchFromGitHub { (fetchFromGitHub {
@ -28,23 +28,11 @@ stdenv.mkDerivation rec {
cd dtools cd dtools
''; '';
postPatch = ''
substituteInPlace posix.mak \
--replace "../dmd/generated/\$(OS)/release/\$(MODEL)/dmd" ${dmd.out}/bin/dmd
substituteInPlace posix.mak \
--replace gcc $CC
# To fix rdmd test with newer phobos
substituteInPlace rdmd.d \
--replace " std.stdiobase," ""
'';
nativeBuildInputs = [ dmd ]; nativeBuildInputs = [ dmd ];
buildInputs = [ curl ]; buildInputs = [ curl ];
makeCmd = '' makeCmd = ''
make -f posix.mak DMD=${dmd.out}/bin/dmd DMD_DIR=dmd make -f posix.mak DMD_DIR=dmd DMD=${dmd.out}/bin/dmd CC=${stdenv.cc}/bin/cc
''; '';
buildPhase = '' buildPhase = ''