diff options
Diffstat (limited to 'pkgs/shells/powershell/default.nix')
-rw-r--r-- | pkgs/shells/powershell/default.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix index ec0e3673832..2f7bc15c1b3 100644 --- a/pkgs/shells/powershell/default.nix +++ b/pkgs/shells/powershell/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, autoPatchelfHook, fetchzip, libunwind, libuuid, icu, curl +{ stdenv, lib, autoPatchelfHook, fetchurl, libunwind, libuuid, icu, curl , darwin, makeWrapper, less, openssl, pam, lttng-ust }: let archString = if stdenv.isAarch64 then "arm64" @@ -7,11 +7,12 @@ let archString = if stdenv.isAarch64 then "arm64" platformString = if stdenv.isDarwin then "osx" else if stdenv.isLinux then "linux" else throw "unsupported platform"; - platformSha = if (stdenv.isDarwin && stdenv.isx86_64) then "sha256-JKB7Oy+3KWtVo1Aqmc7vZiO88FrF9+8N/tdGlvIQolM=" - else if (stdenv.isDarwin && stdenv.isAarch64) then "sha256-9UwB1tT2VaW+favw/KWPziFMSRWcw7AqeeZvbaGOBqc=" - else if (stdenv.isLinux && stdenv.isx86_64) then "sha256-kAcT9av4PFZfYqpS0XwKC0IiquUcVtN30Mq649PUnSM=" - else if (stdenv.isLinux && stdenv.isAarch64) then "sha256-3Lm9WYVcfkEVfji/h52VqFy1Jo1AiSQ22JhEGiCPzzM=" - else throw "unsupported platform"; + platformHash = { + x86_64-darwin = "sha256-FX3OyVzwU+Ms2tgjpZ4dPdjeJx2H5541dQZAjhI3n1U="; + aarch64-darwin = "sha256-Dg7FRF5inRnzP6tjDhIgHTJ1J2EQXnegqimZPK574WQ="; + x86_64-linux = "sha256-6F1VROE6kk+LLEpdwtQ6vkbkZjP4no0TjTnAqurLmXY="; + aarch64-linux = "sha256-NO4E2TOUIYyUFJmi3zKJzOyP0/rTPTZgJZcebVNkSfk="; + }.${stdenv.hostPlatform.system} or (throw "unsupported platform"); platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else if stdenv.isLinux then "LD_LIBRARY_PATH" else throw "unsupported platform"; @@ -20,14 +21,15 @@ let archString = if stdenv.isAarch64 then "arm64" in stdenv.mkDerivation rec { pname = "powershell"; - version = "7.3.2"; + version = "7.3.4"; - src = fetchzip { + src = fetchurl { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-${archString}.tar.gz"; - sha256 = platformSha; - stripRoot = false; + hash = platformHash; }; + sourceRoot = "."; + strictDeps = true; buildInputs = [ less ] ++ libraries; nativeBuildInputs = [ makeWrapper ] |