From 5e8e75a0c6ff626a3dbff3d573695fdcb92bd348 Mon Sep 17 00:00:00 2001 From: midchildan Date: Tue, 8 Sep 2020 23:27:56 +0900 Subject: [PATCH] dmd: relax ld purity check for checkPhase Fix #97420 --- pkgs/development/compilers/dmd/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index a6d4f7e1e20a..4bfd6298c8f7 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -115,13 +115,21 @@ stdenv.mkDerivation rec { doCheck = true; + # NOTE: Purity check is disabled for checkPhase because it doesn't fare well + # with the DMD linker. See https://github.com/NixOS/nixpkgs/issues/97420 checkPhase = '' cd dmd - make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL + NIX_ENFORCE_PURITY= \ + make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL + cd ../druntime - make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release + NIX_ENFORCE_PURITY= \ + make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release + cd ../phobos - make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)" + NIX_ENFORCE_PURITY= \ + make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)" + cd .. '';