summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2023-03-30 04:08:38 -0700
committerGitHub <noreply@github.com>2023-03-30 04:08:38 -0700
commit515452c22371c7b05884e045f2a254bf9161851a (patch)
tree886981217bd9e1171d35d2e505d748a09f713db5 /pkgs/os-specific
parent2b5e971276df9060f55ba64bbed0719147f4fba9 (diff)
parent6db14a3392f2aff688937a8ee7712a2c2aab97a7 (diff)
downloadnixpkgs-515452c22371c7b05884e045f2a254bf9161851a.tar
nixpkgs-515452c22371c7b05884e045f2a254bf9161851a.tar.gz
nixpkgs-515452c22371c7b05884e045f2a254bf9161851a.tar.bz2
nixpkgs-515452c22371c7b05884e045f2a254bf9161851a.tar.lz
nixpkgs-515452c22371c7b05884e045f2a254bf9161851a.tar.xz
nixpkgs-515452c22371c7b05884e045f2a254bf9161851a.tar.zst
nixpkgs-515452c22371c7b05884e045f2a254bf9161851a.zip
Merge pull request #223495 from StepBroBD/raycast
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/darwin/raycast/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/raycast/default.nix b/pkgs/os-specific/darwin/raycast/default.nix
new file mode 100644
index 00000000000..ea635312d1f
--- /dev/null
+++ b/pkgs/os-specific/darwin/raycast/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenvNoCC
+, fetchurl
+, undmg
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "raycast";
+  version = "1.49.0";
+
+  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-6j5PyzJ7g3p+5gE2CQHlZrLj5b3rLdpodl+By7xxcjo=";
+  };
+
+  dontPatch = true;
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
+
+  nativeBuildInputs = [ undmg ];
+
+  sourceRoot = "Raycast.app";
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/Applications/Raycast.app
+    cp -R . $out/Applications/Raycast.app
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Control your tools with a few keystrokes";
+    homepage = "https://raycast.app/";
+    license = licenses.unfree;
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ lovesegfault stepbrobd ];
+    platforms = platforms.darwin;
+  };
+}