From 51eeb21486c35d97ec1fb46ab69edc83b798bc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 18 May 2021 16:36:25 +0200 Subject: [PATCH] powershell: fix darwin build (#123484) --- pkgs/shells/powershell/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix index dfc4f94e12b6..cedf578d46ab 100644 --- a/pkgs/shells/powershell/default.nix +++ b/pkgs/shells/powershell/default.nix @@ -38,6 +38,9 @@ stdenv.mkDerivation rec { rm -f $pslibs/libcrypto${ext}.1.0.0 rm -f $pslibs/libssl${ext}.1.0.0 + # At least the 7.1.3-osx package does not have the executable bit set. + chmod a+x $pslibs/pwsh + ls $pslibs '' + lib.optionalString (!stdenv.isDarwin) '' patchelf --replace-needed libcrypto${ext}.1.0.0 libcrypto${ext}.1.1 $pslibs/libmi.so @@ -55,7 +58,8 @@ stdenv.mkDerivation rec { doInstallCheck = true; installCheckPhase = '' - $out/bin/pwsh --help > /dev/null + # May need a writable home, seen on Darwin. + HOME=$TMP $out/bin/pwsh --help > /dev/null ''; meta = with lib; {