Last active
September 3, 2024 10:14
-
-
Save r-k-b/2485f977b476aa3f76a47329ce7f9ad4 to your computer and use it in GitHub Desktop.
Revisions
-
r-k-b revised this gist
Mar 9, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,6 @@ in pkgs.mkShell { shellHook = '' export CYPRESS_INSTALL_BINARY=0 export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress ''; } -
r-k-b revised this gist
Feb 15, 2021 . 2 changed files with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,11 +8,16 @@ final: prev: { installPhase = let old = "copyExtension(pathToExtension, extensionDest)"; # This has only been tested against Cypress 6.0.0! newForChrome = "copyExtension(pathToExtension, extensionDest).then(() => fs_1.default.chmodAsync(extensionBg, 0o0644))"; newForFirefox = "copyExtension(pathToExtension, extensionDest).then(() => fs.chmodAsync(extensionBg, 0o0644))"; in '' sed -i 's/${old}/${newForChrome}/' \ ./resources/app/packages/server/lib/browsers/chrome.js sed -i 's/${old}/${newForFirefox}/' \ ./resources/app/packages/server/lib/browsers/utils.js '' + oldAttrs.installPhase; }); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,3 @@ in pkgs.mkShell { export CYPRESS_RUN_BINARY=$(which Cypress) ''; } -
r-k-b revised this gist
Jan 21, 2021 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ # When Cypress starts, it copies some files into `~/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension/` # from the Nix Store, one of which it attempts to modify immediately after. # As-is, this fails because the copied file keeps the read-only flag it had in # the Store. # Luckily, the code responsible is a plain text script that we can easily patch: final: prev: { cypress = prev.cypress.overrideAttrs (oldAttrs: { installPhase = let -
r-k-b revised this gist
Jan 21, 2021 . 2 changed files with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,5 +45,5 @@ Cypress Version: 6.2.1 EACCES: permission denied, open '/home/rkb/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension/background.js' ``` ~~apply [this patch](https://github.com/cypress-io/cypress/pull/5579/files) to [Cypress](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/web/cypress/default.nix) from within the shell.nix (or get it upstreamed?)~~ done. Super hacky, but done! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ final: prev: { cypress = prev.cypress.overrideAttrs (oldAttrs: { installPhase = let old = "copyExtension(pathToExtension, extensionDest)"; # This has only been tested against Cypress 6.0.0! new = "copyExtension(pathToExtension, extensionDest).then(() => fs_1.default.chmodAsync(extensionBg, 0o0644))"; in '' -
r-k-b revised this gist
Jan 21, 2021 . 2 changed files with 14 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ final: prev: { cypress = prev.cypress.overrideAttrs (oldAttrs: { installPhase = let old = "copyExtension(pathToExtension, extensionDest)"; new = "copyExtension(pathToExtension, extensionDest).then(() => fs_1.default.chmodAsync(extensionBg, 0o0644))"; in '' sed -i 's/${old}/${new}/' \ ./resources/app/packages/server/lib/browsers/chrome.js '' + oldAttrs.installPhase; }); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ let pkgs = import <nixpkgs> { overlays = [ (import ./cypress-overlay.nix) ]; }; in pkgs.mkShell { name = "cypress-example"; buildInputs = with pkgs; [ -
r-k-b revised this gist
Jan 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,5 +45,5 @@ Cypress Version: 6.2.1 EACCES: permission denied, open '/home/rkb/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension/background.js' ``` apply [this patch](https://github.com/cypress-io/cypress/pull/5579/files) to [Cypress](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/web/cypress/default.nix) from within the shell.nix (or get it upstreamed?) -
r-k-b revised this gist
Jan 21, 2021 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,5 +41,9 @@ Cypress Version: 6.2.1 # todo ``` EACCES: permission denied, open '/home/rkb/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension/background.js' ``` apply [this patch](https://github.com/cypress-io/cypress/pull/5579/files) to Cypress from within the shell.nix (or get it upstreamed?) -
r-k-b revised this gist
Jan 21, 2021 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,4 +37,9 @@ spawn /home/rkb/.cache/Cypress/6.2.1/Cypress/Cypress ENOENT Platform: linux (NixOS - ) Cypress Version: 6.2.1 ``` # todo apply [this patch](https://github.com/cypress-io/cypress/pull/5579/files) to Cypress from within the shell.nix (or get it upstreamed?) -
r-k-b revised this gist
Jan 21, 2021 . No changes.There are no files selected for viewing
-
r-k-b renamed this gist
Jan 21, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
r-k-b created this gist
Jan 21, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ Should help with avoiding errors like: ```text No version of Cypress is installed in: /home/rkb/.cache/Cypress/6.2.1/Cypress Please reinstall Cypress by running: cypress install ---------- Cypress executable not found at: /home/rkb/.cache/Cypress/6.2.1/Cypress/Cypress ---------- Platform: linux (NixOS - ) Cypress Version: 6.2.1 ``` and ```text Cypress failed to start. This is usually caused by a missing library or dependency. The error below should indicate which dependency is missing. https://on.cypress.io/required-dependencies If you are using Docker, we provide containers with all required dependencies installed. ---------- Command failed with ENOENT: /home/rkb/.cache/Cypress/6.2.1/Cypress/Cypress --no-sandbox --smoke-test --ping=459 spawn /home/rkb/.cache/Cypress/6.2.1/Cypress/Cypress ENOENT ---------- Platform: linux (NixOS - ) Cypress Version: 6.2.1 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ { pkgs ? import <nixpkgs> { } }: pkgs.mkShell { name = "cypress-example"; buildInputs = with pkgs; [ cypress (with dotnetCorePackages; combinePackages [ sdk_5_0 net_5_0 ]) nodejs ]; shellHook = '' export CYPRESS_INSTALL_BINARY=0 export CYPRESS_RUN_BINARY=$(which Cypress) ''; }