From e0777cba1913491e8cb90c4692664907bbe7841f Mon Sep 17 00:00:00 2001 From: Lionello Lunesu Date: Mon, 27 Apr 2020 06:39:12 +0800 Subject: [PATCH] Patch bash in test6952.d --- pkgs/development/compilers/dmd/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index bdce25096bad..a6d4f7e1e20a 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub , makeWrapper, unzip, which, writeTextFile , curl, tzdata, gdb, darwin, git, callPackage -, targetPackages, fetchpatch +, targetPackages, fetchpatch, bash , dmdBootstrap ? callPackage ./bootstrap.nix { } , HOST_DMD ? "${dmdBootstrap}/bin/dmd" , version ? "2.091.1" @@ -74,7 +74,10 @@ stdenv.mkDerivation rec { patchShebangs . ''; - postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' + postPatch = '' + substituteInPlace dmd/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash" + '' + + stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" "" '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''