Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #237960 from StepBroBD/raycast

authored by Bernardo Meurer and committed by GitHub 74d41199 b76bd65a

+8 -14
+4 -10
pkgs/os-specific/darwin/raycast/default.nix
··· 6 6 7 7 stdenvNoCC.mkDerivation rec { 8 8 pname = "raycast"; 9 - version = "1.53.2"; 9 + version = "1.53.3"; 10 10 11 11 src = fetchurl { 12 - # https://github.com/NixOS/nixpkgs/pull/223495 13 - # official download API: https://api.raycast.app/v2/download 14 - # this returns an AWS CloudFront signed URL with expiration timestamp and signature 15 - # the returned URL will always be the latest Raycast which might result in an impure derivation 16 - # the package maintainer created a repo (https://github.com/stepbrobd/raycast-overlay) 17 - # to host GitHub Actions to periodically check for updates 18 - # and re-release the `.dmg` file to Internet Archive (https://archive.org/details/raycast) 19 - url = "https://archive.org/download/raycast/raycast-${version}.dmg"; 20 - sha256 = "sha256-e2UGS1LSBj0xZu0gWlb8SiXhx1sZzcZDOGPhg6ziI9c="; 12 + name = "Raycast.dmg"; 13 + url = "https://releases.raycast.com/releases/${version}/download?build=universal"; 14 + sha256 = "sha256-FHCNySTtP7Dxa2UAlYoHD4u5ammLuhOQKC3NGpxcyYo="; 21 15 }; 22 16 23 17 dontPatch = true;
+4 -4
pkgs/os-specific/darwin/raycast/update.sh
··· 3 3 4 4 set -eo pipefail 5 5 6 - 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/')" 7 - old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)" 6 + new_version=$(curl --silent https://releases.raycast.com/releases/latest | jq -r '.version') 7 + old_version=$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix) 8 8 9 - if [[ "$new_version" == "$old_version" ]]; then 9 + if [[ $new_version == $old_version ]]; then 10 10 echo "Already up to date." 11 11 exit 0 12 12 else ··· 15 15 rm ./default.nix.bak 16 16 fi 17 17 18 - 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')" 18 + 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') 19 19 sed -Ei.bak '/ *sha256 = /{N;N; s@("sha256-)[^;"]+@"'"$hash"'@}' ./default.nix 20 20 rm ./default.nix.bak