2021-07-16 19:40:57 +00:00
|
|
|
{ alsa-lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
, callPackage
|
|
|
|
, fetchzip
|
|
|
|
, gnome2
|
|
|
|
, gtk2
|
|
|
|
, gtk3
|
|
|
|
, lib
|
|
|
|
, mesa
|
|
|
|
, nss
|
|
|
|
, stdenv
|
|
|
|
, udev
|
|
|
|
, unzip
|
|
|
|
, wrapGAppsHook
|
|
|
|
, xorg
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "cypress";
|
2021-08-22 07:53:02 +00:00
|
|
|
version = "8.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
|
2021-08-22 07:53:02 +00:00
|
|
|
sha256 = "sha256-MmdAi/AZ4CI/dPWbJxAXYTg/h0Dr/eEVYcZLMHaDQQ0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# don't remove runtime deps
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = with xorg; [
|
2021-07-16 19:40:57 +00:00
|
|
|
libXScrnSaver
|
|
|
|
libXdamage
|
|
|
|
libXtst
|
|
|
|
libxshmfence
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ [
|
2021-07-16 19:40:57 +00:00
|
|
|
nss
|
|
|
|
gtk2
|
|
|
|
alsa-lib
|
|
|
|
gnome2.GConf
|
|
|
|
gtk3
|
2021-04-26 19:14:03 +00:00
|
|
|
mesa # for libgbm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
runtimeDependencies = [ (lib.getLib udev) ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-04-13 19:44:15 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
# Cypress now verifies version by reading bin/resources/app/package.json
|
|
|
|
mkdir -p $out/bin/resources/app
|
|
|
|
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
|
|
|
|
ln -s $out/opt/cypress/Cypress $out/bin/Cypress
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = ./update.sh;
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
example = callPackage ./cypress-example-kitchensink { };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fast, easy and reliable testing for anything that runs in a browser";
|
|
|
|
homepage = "https://www.cypress.io";
|
|
|
|
license = licenses.mit;
|
2021-07-16 19:40:57 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ tweber mmahut ];
|
|
|
|
};
|
|
|
|
}
|