summary refs log tree commit diff
path: root/pkgs/shells/powershell/default.nix
diff options
context:
space:
mode:
authorStéphan Kochen <git@stephank.nl>2021-05-18 16:36:25 +0200
committerGitHub <noreply@github.com>2021-05-18 10:36:25 -0400
commit51eeb21486c35d97ec1fb46ab69edc83b798bc2a (patch)
tree315aa8d5ab5ec02fc509a451d3c1cffc25c0f9ad /pkgs/shells/powershell/default.nix
parentfbf1525f0186aaaf7f7c84eee3ec35b9573e80f1 (diff)
downloadnixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.tar
nixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.tar.gz
nixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.tar.bz2
nixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.tar.lz
nixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.tar.xz
nixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.tar.zst
nixpkgs-51eeb21486c35d97ec1fb46ab69edc83b798bc2a.zip
powershell: fix darwin build (#123484)
Diffstat (limited to 'pkgs/shells/powershell/default.nix')
-rw-r--r--pkgs/shells/powershell/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix
index dfc4f94e12b..cedf578d46a 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; {