acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / ra / raycast / package.nix
bloba963e4451c0cf7508eb5a16857956189715f82b8
2   lib,
3   stdenvNoCC,
4   fetchurl,
5   writeShellApplication,
6   curl,
7   jq,
8   common-updater-scripts,
9   undmg,
12 stdenvNoCC.mkDerivation (finalAttrs: {
13   pname = "raycast";
14   version = "1.86.0";
16   src = fetchurl {
17     name = "Raycast.dmg";
18     url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=universal";
19     hash = "sha256-UvMPRLCaGgunpVwoF0Nbz+7Gma7zQP+nMMh5Cvqn0MA=";
20   };
22   dontPatch = true;
23   dontConfigure = true;
24   dontBuild = true;
25   dontFixup = true;
27   nativeBuildInputs = [ undmg ];
29   sourceRoot = "Raycast.app";
31   installPhase = ''
32     runHook preInstall
34     mkdir -p $out/Applications/Raycast.app
35     cp -R . $out/Applications/Raycast.app
37     runHook postInstall
38   '';
40   passthru.updateScript = lib.getExe (writeShellApplication {
41     name = "raycast-update-script";
42     runtimeInputs = [
43       curl
44       jq
45       common-updater-scripts
46     ];
47     text = ''
48       url=$(curl --silent "https://releases.raycast.com/releases/latest?build=universal")
49       version=$(echo "$url" | jq -r '.version')
50       update-source-version raycast "$version" --file=./pkgs/by-name/ra/raycast/package.nix
51     '';
52   });
54   meta = {
55     description = "Control your tools with a few keystrokes";
56     homepage = "https://raycast.app/";
57     license = lib.licenses.unfree;
58     maintainers = with lib.maintainers; [
59       lovesegfault
60       stepbrobd
61       donteatoreo
62       jakecleary
63     ];
64     platforms = [
65       "aarch64-darwin"
66       "x86_64-darwin"
67     ];
68     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
69   };