2020-08-12 19:29:37 +01:00
|
|
|
{ stdenv, lib, fetchzip, autoPatchelfHook, xorg, gtk2, gnome2, gtk3, nss, alsaLib, udev, unzip, wrapGAppsHook }:
|
2019-07-16 14:39:08 +01:00
|
|
|
|
2020-06-07 22:11:08 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-07-16 14:39:08 +01:00
|
|
|
pname = "cypress";
|
2020-11-28 15:55:00 +00:00
|
|
|
version = "6.0.0";
|
2019-07-16 14:39:08 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
|
2020-11-28 15:55:00 +00:00
|
|
|
sha256 = "0hii7kp48ba07gsd521wwl288p808xr2wqgk1iidxkzj2v6g71by";
|
2019-07-16 14:39:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# don't remove runtime deps
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
2019-07-19 08:26:13 +01:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook ];
|
2019-07-16 14:39:08 +01:00
|
|
|
|
|
|
|
buildInputs = with xorg; [
|
|
|
|
libXScrnSaver libXdamage libXtst
|
|
|
|
] ++ [
|
|
|
|
nss gtk2 alsaLib gnome2.GConf gtk3 unzip
|
|
|
|
];
|
|
|
|
|
2020-08-12 19:29:37 +01:00
|
|
|
runtimeDependencies = [ (lib.getLib udev) ];
|
2019-07-16 14:39:08 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/opt/cypress
|
|
|
|
cp -vr * $out/opt/cypress/
|
|
|
|
# Let's create the file binary_state ourselves to make the npm package happy on initial verification.
|
2019-09-29 04:52:17 +01:00
|
|
|
# Cypress now verifies version by reading bin/resources/app/package.json
|
|
|
|
mkdir -p $out/bin/resources/app
|
2019-10-26 19:36:51 +01:00
|
|
|
printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json
|
2019-09-29 04:52:17 +01:00
|
|
|
# Cypress now looks for binary_state.json in bin
|
2020-02-11 23:32:43 +00:00
|
|
|
echo '{"verified": true}' > $out/binary_state.json
|
2019-07-16 14:39:08 +01:00
|
|
|
ln -s $out/opt/cypress/Cypress $out/bin/Cypress
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-16 14:39:08 +01:00
|
|
|
description = "Fast, easy and reliable testing for anything that runs in a browser";
|
|
|
|
homepage = "https://www.cypress.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = ["x86_64-linux"];
|
|
|
|
maintainers = with maintainers; [ tweber mmahut ];
|
|
|
|
};
|
|
|
|
}
|