3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #158477 from hlolli/fix-slack-updater-and-url

slack: fix linux url and updater
This commit is contained in:
Ben Siraphob 2022-02-07 17:57:28 +00:00 committed by GitHub
commit 64b6903008
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -51,8 +51,8 @@ let
x86_64-linux-version = "4.23.0";
x86_64-linux-sha256 = "1wsrxacnj9f3cb6as7ncbdvi02jqcbyc7ijsavps5bls9phkp0is";
aarch64-darwin-version = "4.22.0";
aarch64-darwin-sha256 = "1z2pcgva9ixjx702c1535b4k0xr9fdnfzi5m08xgvabk9x66hqx4";
aarch64-darwin-version = "4.23.0";
aarch64-darwin-sha256 = "053psiqysyi7l8pviq0vwvk2azlxcpdrwfa0b99f1h6lbfcf48f3";
version = {
x86_64-darwin = x86_64-darwin-version;
@ -69,7 +69,7 @@ let
sha256 = x86_64-darwin-sha256;
};
x86_64-linux = fetchurl {
url = "${base}/linux_releases/slack-desktop-${version}-amd64.deb";
url = "${base}/releases/linux/${version}/prod/x64/slack-desktop-${version}-amd64.deb";
sha256 = x86_64-linux-sha256;
};
aarch64-darwin = fetchurl {

View file

@ -18,7 +18,9 @@ nixpkgs_linux_version=$(cat "$slack_nix" | sed -n 's/.*x86_64-linux-version = \"
nixpkgs_mac_version=$(cat "$slack_nix" | sed -n 's/.*x86_64-darwin-version = \"\([0-9\.]\+\)\";.*/\1/p')
nixpkgs_mac_arm_version=$(cat "$slack_nix" | sed -n 's/.*aarch64-darwin-version = \"\([0-9\.]\+\)\";.*/\1/p')
if [[ "$nixpkgs_linux_version" == "$latest_linux_version" && "$nixpkgs_mac_version" == "$latest_mac_version" ]]; then
if [[ "$nixpkgs_linux_version" == "$latest_linux_version" && \
"$nixpkgs_mac_version" == "$latest_mac_version" && \
"$nixpkgs_mac_arm_version" == "$latest_mac_version" ]]; then
echo "nixpkgs versions are all up to date!"
exit 0
fi
@ -34,7 +36,7 @@ sed -i "s/x86_64-linux-version = \".*\"/x86_64-linux-version = \"${latest_linux_
sed -i "s/x86_64-darwin-version = \".*\"/x86_64-darwin-version = \"${latest_mac_version}\"/" "$slack_nix"
sed -i "s/aarch64-darwin-version = \".*\"/aarch64-darwin-version = \"${latest_mac_version}\"/" "$slack_nix"
sed -i "s/x86_64-linux-sha256 = \".*\"/x86_64-linux-sha256 = \"${linux_sha256}\"/" "$slack_nix"
sed -i "s/x86_64-darwin-sha256 = \".*\"/x86_64-darwin-sha256 = \"${mac_arm_sha256}\"/" "$slack_nix"
sed -i "s/x86_64-darwin-sha256 = \".*\"/x86_64-darwin-sha256 = \"${mac_sha256}\"/" "$slack_nix"
sed -i "s/aarch64-darwin-sha256 = \".*\"/aarch64-darwin-sha256 = \"${mac_arm_sha256}\"/" "$slack_nix"
if ! nix-build -A slack "$nixpkgs"; then