nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 77 lines 1.7 kB view raw
1{ alsa-lib 2, autoPatchelfHook 3, callPackage 4, fetchzip 5, gtk2 6, gtk3 7, lib 8, mesa 9, nss 10, stdenv 11, udev 12, unzip 13, wrapGAppsHook 14, xorg 15}: 16 17stdenv.mkDerivation rec { 18 pname = "cypress"; 19 version = "9.6.0"; 20 21 src = fetchzip { 22 url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip"; 23 sha256 = "Mac6lmwQqbj9EPfpG0iLI8Qx04q7E0swmTqXx0J+Sdc="; 24 }; 25 26 # don't remove runtime deps 27 dontPatchELF = true; 28 29 nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook unzip ]; 30 31 buildInputs = with xorg; [ 32 libXScrnSaver 33 libXdamage 34 libXtst 35 libxshmfence 36 ] ++ [ 37 nss 38 gtk2 39 alsa-lib 40 gtk3 41 mesa # for libgbm 42 ]; 43 44 runtimeDependencies = [ (lib.getLib udev) ]; 45 46 installPhase = '' 47 runHook preInstall 48 49 mkdir -p $out/bin $out/opt/cypress 50 cp -vr * $out/opt/cypress/ 51 # Let's create the file binary_state ourselves to make the npm package happy on initial verification. 52 # Cypress now verifies version by reading bin/resources/app/package.json 53 mkdir -p $out/bin/resources/app 54 printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json 55 # Cypress now looks for binary_state.json in bin 56 echo '{"verified": true}' > $out/binary_state.json 57 ln -s $out/opt/cypress/Cypress $out/bin/Cypress 58 59 runHook postInstall 60 ''; 61 62 passthru = { 63 updateScript = ./update.sh; 64 65 tests = { 66 example = callPackage ./cypress-example-kitchensink { }; 67 }; 68 }; 69 70 meta = with lib; { 71 description = "Fast, easy and reliable testing for anything that runs in a browser"; 72 homepage = "https://www.cypress.io"; 73 license = licenses.mit; 74 platforms = [ "x86_64-linux" ]; 75 maintainers = with maintainers; [ tweber mmahut ]; 76 }; 77}