2019-07-19 07:26:13 +00:00
|
|
|
{ stdenv, fetchzip, autoPatchelfHook, xorg, gtk2, gnome2, gtk3, nss, alsaLib, udev, unzip, wrapGAppsHook }:
|
2019-07-16 13:39:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec{
|
|
|
|
pname = "cypress";
|
2019-11-25 15:13:53 +00:00
|
|
|
version = "3.6.1";
|
2019-07-16 13:39:08 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
|
2019-11-25 15:13:53 +00:00
|
|
|
sha256 = "0vlfmhsz7zkp3bjsgqmp9n716d5znicl42hm0m9hl7ndvgm9z9z0";
|
2019-07-16 13:39:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# don't remove runtime deps
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
2019-07-19 07:26:13 +00:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook ];
|
2019-07-16 13:39:08 +00:00
|
|
|
|
|
|
|
buildInputs = with xorg; [
|
|
|
|
libXScrnSaver libXdamage libXtst
|
|
|
|
] ++ [
|
|
|
|
nss gtk2 alsaLib gnome2.GConf gtk3 unzip
|
|
|
|
];
|
|
|
|
|
|
|
|
runtimeDependencies = [ udev.lib ];
|
|
|
|
|
|
|
|
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 03:52:17 +00:00
|
|
|
# Cypress now verifies version by reading bin/resources/app/package.json
|
|
|
|
mkdir -p $out/bin/resources/app
|
2019-10-26 18:36:51 +00:00
|
|
|
printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json
|
2019-09-29 03:52:17 +00:00
|
|
|
# Cypress now looks for binary_state.json in bin
|
|
|
|
echo '{"verified": true}' > $out/bin/binary_state.json
|
2019-07-16 13:39:08 +00:00
|
|
|
ln -s $out/opt/cypress/Cypress $out/bin/Cypress
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|