about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-06-16 12:01:08 +0000
committerGitHub <noreply@github.com>2023-06-16 12:01:08 +0000
commitebaef3ce4c2d9c1d05f0090532fd7d0c732c67e7 (patch)
tree4d478b8e6f40e04c879214e0d4957ba5c1fa4ca0 /pkgs/os-specific
parent78cac6fbf4c2873093e91db90af8b5763dc17669 (diff)
parent74d411997605c40d7da19bf482d936c4eaaa7df4 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/os-specific')
-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 5c06c8181e3ec..4772991e88a53 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 d8f4e109da21d..f338f5f278fca 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