about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/electron/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/electron/common.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/electron/common.nix14
1 files changed, 5 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/tools/electron/common.nix b/nixpkgs/pkgs/development/tools/electron/common.nix
index 749aafc44924..823b45971139 100644
--- a/nixpkgs/pkgs/development/tools/electron/common.nix
+++ b/nixpkgs/pkgs/development/tools/electron/common.nix
@@ -5,7 +5,7 @@
 , python3
 , fetchYarnDeps
 , fetchNpmDeps
-, fixup_yarn_lock
+, prefetch-yarn-deps
 , npmHooks
 , yarn
 , substituteAll
@@ -27,7 +27,7 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
   inherit (info) version;
   buildTargets = [ "electron:electron_dist_zip" ];
 
-  nativeBuildInputs = base.nativeBuildInputs ++ [ nodejs yarn fixup_yarn_lock unzip npmHooks.npmConfigHook ];
+  nativeBuildInputs = base.nativeBuildInputs ++ [ nodejs yarn prefetch-yarn-deps unzip npmHooks.npmConfigHook ];
   buildInputs = base.buildInputs ++ [ libnotify ];
 
   electronOfflineCache = fetchYarnDeps {
@@ -48,10 +48,6 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
       src = ./version.patch;
       inherit (info) version;
     })
-
-  # we remove the web_tests directory in the chromium src FOD to reduce the output size, but this backported patch includes patches on web_tests
-  ++ lib.optional (lib.versions.major info.version == "26")
-    ./electron-26-remove-web_tests-patch.patch
   ;
 
   unpackPhase = ''
@@ -111,7 +107,7 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
       cd electron
       export HOME=$TMPDIR/fake_home
       yarn config --offline set yarn-offline-mirror $electronOfflineCache
-      fixup_yarn_lock yarn.lock
+      fixup-yarn-lock yarn.lock
       yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
     )
 
@@ -122,10 +118,10 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
       for key in $(jq -r "keys[]" $config)
       do
         value=$(jq -r ".\"$key\"" $config)
-        echo patching $value
         for patch in $(cat $key/.patches)
         do
-          git apply -p1 --directory=$value $key/$patch
+          echo applying in $value: $patch
+          git apply -p1 --directory=$value --exclude='src/third_party/blink/web_tests/*' $key/$patch
         done
       done
     )