forked from mirrors/nixpkgs
powershell: 7.3.2 -> 7.3.4
This commit is contained in:
parent
03bec0f29d
commit
b4995a61c7
|
@ -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 }:
|
, darwin, makeWrapper, less, openssl, pam, lttng-ust }:
|
||||||
|
|
||||||
let archString = if stdenv.isAarch64 then "arm64"
|
let archString = if stdenv.isAarch64 then "arm64"
|
||||||
|
@ -7,11 +7,12 @@ let archString = if stdenv.isAarch64 then "arm64"
|
||||||
platformString = if stdenv.isDarwin then "osx"
|
platformString = if stdenv.isDarwin then "osx"
|
||||||
else if stdenv.isLinux then "linux"
|
else if stdenv.isLinux then "linux"
|
||||||
else throw "unsupported platform";
|
else throw "unsupported platform";
|
||||||
platformSha = if (stdenv.isDarwin && stdenv.isx86_64) then "sha256-JKB7Oy+3KWtVo1Aqmc7vZiO88FrF9+8N/tdGlvIQolM="
|
platformHash = {
|
||||||
else if (stdenv.isDarwin && stdenv.isAarch64) then "sha256-9UwB1tT2VaW+favw/KWPziFMSRWcw7AqeeZvbaGOBqc="
|
x86_64-darwin = "sha256-FX3OyVzwU+Ms2tgjpZ4dPdjeJx2H5541dQZAjhI3n1U=";
|
||||||
else if (stdenv.isLinux && stdenv.isx86_64) then "sha256-kAcT9av4PFZfYqpS0XwKC0IiquUcVtN30Mq649PUnSM="
|
aarch64-darwin = "sha256-Dg7FRF5inRnzP6tjDhIgHTJ1J2EQXnegqimZPK574WQ=";
|
||||||
else if (stdenv.isLinux && stdenv.isAarch64) then "sha256-3Lm9WYVcfkEVfji/h52VqFy1Jo1AiSQ22JhEGiCPzzM="
|
x86_64-linux = "sha256-6F1VROE6kk+LLEpdwtQ6vkbkZjP4no0TjTnAqurLmXY=";
|
||||||
else throw "unsupported platform";
|
aarch64-linux = "sha256-NO4E2TOUIYyUFJmi3zKJzOyP0/rTPTZgJZcebVNkSfk=";
|
||||||
|
}.${stdenv.hostPlatform.system} or (throw "unsupported platform");
|
||||||
platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
|
platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
|
||||||
else if stdenv.isLinux then "LD_LIBRARY_PATH"
|
else if stdenv.isLinux then "LD_LIBRARY_PATH"
|
||||||
else throw "unsupported platform";
|
else throw "unsupported platform";
|
||||||
|
@ -20,14 +21,15 @@ let archString = if stdenv.isAarch64 then "arm64"
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "powershell";
|
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";
|
url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-${archString}.tar.gz";
|
||||||
sha256 = platformSha;
|
hash = platformHash;
|
||||||
stripRoot = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
buildInputs = [ less ] ++ libraries;
|
buildInputs = [ less ] ++ libraries;
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i bash -p bash wget coreutils gnutar nix
|
#!nix-shell -i bash -p bash wget coreutils nix
|
||||||
version=$1
|
version=$1
|
||||||
|
|
||||||
if [[ -z $version ]]
|
if [[ -z $version ]]
|
||||||
|
@ -11,9 +11,8 @@ fi
|
||||||
allOutput=""
|
allOutput=""
|
||||||
|
|
||||||
dlDest=$(mktemp)
|
dlDest=$(mktemp)
|
||||||
exDest=$(mktemp -d)
|
|
||||||
|
|
||||||
trap 'rm $dlDest; rm -r $exDest' EXIT
|
trap 'rm $dlDest' EXIT
|
||||||
|
|
||||||
for plat in osx linux; do
|
for plat in osx linux; do
|
||||||
for arch in x64 arm64; do
|
for arch in x64 arm64; do
|
||||||
|
@ -21,18 +20,13 @@ for plat in osx linux; do
|
||||||
URL="https://github.com/PowerShell/PowerShell/releases/download/v$version/powershell-$version-$plat-$arch.tar.gz"
|
URL="https://github.com/PowerShell/PowerShell/releases/download/v$version/powershell-$version-$plat-$arch.tar.gz"
|
||||||
wget $URL -O $dlDest >&2
|
wget $URL -O $dlDest >&2
|
||||||
|
|
||||||
tar -xzf $dlDest -C $exDest >&2
|
hash=$(nix hash file $dlDest)
|
||||||
|
|
||||||
hash=$(nix hash path $exDest)
|
|
||||||
|
|
||||||
allOutput+="
|
allOutput+="
|
||||||
variant: $plat $arch
|
variant: $plat $arch
|
||||||
hash: $hash
|
hash: $hash
|
||||||
"
|
"
|
||||||
|
|
||||||
rm -r $exDest
|
|
||||||
mkdir $exDest
|
|
||||||
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue