summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2023-06-16 07:57:08 -0400
committerGitHub <noreply@github.com>2023-06-16 07:57:08 -0400
commit74d411997605c40d7da19bf482d936c4eaaa7df4 (patch)
treec009f3eaaa84181eef2ba71cbe023111a4820737
parentMerge pull request #237406 from TuxCoder/byobu_cross (diff)
parentraycast: 1.53.2 -> 1.53.3 (diff)
downloadnixpkgs-74d411997605c40d7da19bf482d936c4eaaa7df4.tar.gz
Merge pull request #237960 from StepBroBD/raycast
-rw-r--r--pkgs/os-specific/darwin/raycast/default.nix14
-rwxr-xr-xpkgs/os-specific/darwin/raycast/update.sh8
2 files changed, 8 insertions, 14 deletions
diff --git a/pkgs/os-specific/darwin/raycast/default.nix b/pkgs/os-specific/darwin/raycast/default.nix
index 5c06c8181e3e..4772991e88a5 100644
--- a/pkgs/os-specific/darwin/raycast/default.nix
+++ b/pkgs/os-specific/darwin/raycast/default.nix
@@ -6,18 +6,12 @@
stdenvNoCC.mkDerivation rec {
pname = "raycast";
- version = "1.53.2";
+ version = "1.53.3";
src = fetchurl {
- # https://github.com/NixOS/nixpkgs/pull/223495
- # official download API: https://api.raycast.app/v2/download
- # this returns an AWS CloudFront signed URL with expiration timestamp and signature
- # the returned URL will always be the latest Raycast which might result in an impure derivation
- # the package maintainer created a repo (https://github.com/stepbrobd/raycast-overlay)
- # to host GitHub Actions to periodically check for updates
- # and re-release the `.dmg` file to Internet Archive (https://archive.org/details/raycast)
- url = "https://archive.org/download/raycast/raycast-${version}.dmg";
- sha256 = "sha256-e2UGS1LSBj0xZu0gWlb8SiXhx1sZzcZDOGPhg6ziI9c=";
+ name = "Raycast.dmg";
+ url = "https://releases.raycast.com/releases/${version}/download?build=universal";
+ sha256 = "sha256-FHCNySTtP7Dxa2UAlYoHD4u5ammLuhOQKC3NGpxcyYo=";
};
dontPatch = true;
diff --git a/pkgs/os-specific/darwin/raycast/update.sh b/pkgs/os-specific/darwin/raycast/update.sh
index d8f4e109da21..f338f5f278fc 100755
--- a/pkgs/os-specific/darwin/raycast/update.sh
+++ b/pkgs/os-specific/darwin/raycast/update.sh
@@ -3,10 +3,10 @@
set -eo pipefail
-new_version="$(ia list raycast | grep -Eo '^raycast-.*\.dmg$' | sort -r | head -n1 | sed -E 's/^raycast-([0-9]+\.[0-9]+\.[0-9]+)\.dmg$/\1/')"
-old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
+new_version=$(curl --silent https://releases.raycast.com/releases/latest | jq -r '.version')
+old_version=$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)
-if [[ "$new_version" == "$old_version" ]]; then
+if [[ $new_version == $old_version ]]; then
echo "Already up to date."
exit 0
else
@@ -15,6 +15,6 @@ else
rm ./default.nix.bak
fi
-hash="$(nix --extra-experimental-features nix-command store prefetch-file --json --hash-type sha256 "https://archive.org/download/raycast/raycast-$new_version.dmg" | jq -r '.hash')"
+hash=$(nix --extra-experimental-features nix-command store prefetch-file --json --hash-type sha256 "https://releases.raycast.com/releases/$new_version/download?build=universal" | jq -r '.hash')
sed -Ei.bak '/ *sha256 = /{N;N; s@("sha256-)[^;"]+@"'"$hash"'@}' ./default.nix
rm ./default.nix.bak