powershell: fix darwin build (#123484)

Changed files
+5 -1
pkgs
shells
powershell
+5 -1
pkgs/shells/powershell/default.nix
···
rm -f $pslibs/libcrypto${ext}.1.0.0
rm -f $pslibs/libssl${ext}.1.0.0
ls $pslibs
'' + lib.optionalString (!stdenv.isDarwin) ''
patchelf --replace-needed libcrypto${ext}.1.0.0 libcrypto${ext}.1.1 $pslibs/libmi.so
···
doInstallCheck = true;
installCheckPhase = ''
-
$out/bin/pwsh --help > /dev/null
'';
meta = with lib; {
···
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
···
doInstallCheck = true;
installCheckPhase = ''
+
# May need a writable home, seen on Darwin.
+
HOME=$TMP $out/bin/pwsh --help > /dev/null
'';
meta = with lib; {