Change:
Project description <!-- Describe the project a little: --Cypress is one of the most popular e2e testing tools. We already packaged aarch64-linux + x86-64-linux, but not darwin. Binaries for all platforms are available, see =should be easy to do Metadata homepage URL: source URL: Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
I've had a stab at this (with help from Perplexity): Unfortunately, it does not seem to work properly, when I run the built package there's an error stating "this package is broken". I've never packaged something for darwin before, no Idea how to fix this. Happy to take pointers.
Turns out this is a quarantine thing. Apparently there's an option in the setting in the privacy options where you can allow opening these "untrusted" binaries, once done it will show "hey this is broken, do you want to open it" and if you click yes, it opens. I guess I'll send a PR then
PR is up:

Discussion:
, unzip , wrapGAppsHook3 , xorg <ins> , darwin </ins> }: let

platform = "linux-arm64"; checksum = "sha256-rB0ak6jYnJMb0aHDLAyhaGoOFK4FXDLEOeofNdW/Wk8="; }; <ins> aarch64-darwin = { platform = "darwin-arm64"; checksum = "sha256-L2rhtB/DIK7Qum2YNoWVBn4mf+DA3rbcBUfZEEa/C8c="; }; </ins> }; inherit (stdenv.hostPlatform) system; binary = availableBinaries.${system} or (throw "cypress: No binaries available for system ${system}");

src = fetchzip { url = "https://cdn.cypress.io/desktop/${version}/${platform}/cypress.zip"; sha256 = checksum; <ins> stripRoot = !stdenv.isDarwin; </ins> }; # don't remove runtime deps dontPatchELF = true; <del> nativeBuildInputs = [ autoPatchelfHook (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) unzip makeShellWrapper]; </del> <ins> nativeBuildInputs = [ unzip makeShellWrapper ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) ]; </ins> <del> buildInputs = with xorg; [ </del> <ins> buildInputs = lib.optionals stdenv.isLinux (with xorg; [ </ins> libXScrnSaver libXdamage libXtst libxshmfence <del> ] ++ [ </del> nss gtk2 alsa-lib gtk3 mesa # for libgbm <del> ]; </del> <ins> ]) ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa CoreServices CoreMedia CoreAudio AudioToolbox AVFoundation Foundation ApplicationServices ]); </ins> <del> runtimeDependencies = [ (lib.getLib udev) ]; </del> <ins> runtimeDependencies = lib.optional stdenv.isLinux (lib.getLib udev); </ins> installPhase = '' runHook preInstall

printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json # Cypress now looks for binary_state.json in bin echo '{"verified": true}' > $out/binary_state.json <del> ln -s $out/opt/cypress/Cypress $out/bin/cypress </del> <ins> ${if stdenv.isDarwin then '' ln -s $out/opt/cypress/Cypress.app/Contents/MacOS/Cypress $out/bin/cypress '' else '' ln -s $out/opt/cypress/Cypress $out/bin/cypress ''} </ins> runHook postInstall ''; <del> postFixup = '' </del> <ins> postFixup = lib.optionalString (!stdenv.isDarwin) '' </ins> # exit with 1 after 25.05 makeWrapper $out/opt/cypress/Cypress $out/bin/Cypress  --run 'echo "Warning: Use the lowercase cypress executable instead of the capitalized one."'