20 platform = "linux-x64";
21 checksum = "sha256-9o0nprGcJhudS1LNm+T7Vf0Dwd1RBauYKI+w1FBQ3ZM=";
24 platform = "linux-arm64";
25 checksum = "sha256-aW3cUZqAdiOLzOC9BQM/bTkDVyw24Dx9nBSXgbiKe4c=";
28 inherit (stdenv.hostPlatform) system;
29 binary = availableBinaries.${system} or (throw "cypress: No binaries available for system ${system}");
30 inherit (binary) platform checksum;
31 in stdenv.mkDerivation rec {
36 url = "https://cdn.cypress.io/desktop/${version}/${platform}/cypress.zip";
40 # don't remove runtime deps
43 nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook unzip ];
45 buildInputs = with xorg; [
58 runtimeDependencies = [ (lib.getLib udev) ];
63 mkdir -p $out/bin $out/opt/cypress
64 cp -vr * $out/opt/cypress/
65 # Let's create the file binary_state ourselves to make the npm package happy on initial verification.
66 # Cypress now verifies version by reading bin/resources/app/package.json
67 mkdir -p $out/bin/resources/app
68 printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json
69 # Cypress now looks for binary_state.json in bin
70 echo '{"verified": true}' > $out/binary_state.json
71 ln -s $out/opt/cypress/Cypress $out/bin/Cypress
77 updateScript = ./update.sh;
80 # We used to have a test here, but was removed because
81 # - it broke, and ofborg didn't fail https://github.com/NixOS/ofborg/issues/629
82 # - it had a large footprint in the repo; prefer RFC 92 or an ugly FOD fetcher?
83 # - the author switched away from cypress.
84 # To provide a test once more, you may find useful information in
85 # https://github.com/NixOS/nixpkgs/pull/223903
90 description = "Fast, easy and reliable testing for anything that runs in a browser";
91 homepage = "https://www.cypress.io";
92 mainProgram = "Cypress";
93 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
94 license = licenses.mit;
95 platforms = lib.attrNames availableBinaries;
96 maintainers = with maintainers; [ tweber mmahut Crafter ];