From d2184ac8686da08f294b875e9a0ec0121c3a8b1d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 5 Jul 2022 21:09:22 +0200 Subject: [PATCH 1/2] electron: fix headers location see https://www.electronjs.org/blog/s3-bucket-change for more info --- pkgs/development/tools/electron/generic.nix | 2 +- pkgs/development/tools/electron/print-hashes.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/electron/generic.nix b/pkgs/development/tools/electron/generic.nix index 0016e82c47cd..06440a80a4a9 100644 --- a/pkgs/development/tools/electron/generic.nix +++ b/pkgs/development/tools/electron/generic.nix @@ -39,7 +39,7 @@ let }; headersFetcher = vers: hash: fetchurl { - url = "https://atom.io/download/electron/v${vers}/node-v${vers}-headers.tar.gz"; + url = "https://artifacts.electronjs.org/headers/dist/v${vers}/node-v${vers}-headers.tar.gz"; sha256 = hash; }; diff --git a/pkgs/development/tools/electron/print-hashes.sh b/pkgs/development/tools/electron/print-hashes.sh index 48c8f0412e10..e43f1f922a94 100755 --- a/pkgs/development/tools/electron/print-hashes.sh +++ b/pkgs/development/tools/electron/print-hashes.sh @@ -7,8 +7,7 @@ if [[ $# -lt 1 ]]; then exit 1 fi - -VERSION=$1 +VERSION="$1" declare -A SYSTEMS HASHES SYSTEMS=( @@ -20,8 +19,8 @@ SYSTEMS=( [aarch64-darwin]=darwin-arm64 ) -hashfile="$(nix-prefetch-url --print-path "https://github.com/electron/electron/releases/download/v${VERSION}/SHASUMS256.txt" 2>/dev/null | tail -n1)" -headers="$(nix-prefetch-url "https://atom.io/download/electron/v${VERSION}/node-v${VERSION}-headers.tar.gz")" +hashfile="$(nix-prefetch-url --print-path "https://github.com/electron/electron/releases/download/v${VERSION}/SHASUMS256.txt" | tail -n1)" +headers="$(nix-prefetch-url "https://artifacts.electronjs.org/headers/dist/v${VERSION}/node-v${VERSION}-headers.tar.gz")" # Entry similar to the following goes in default.nix: From 715b7691f2c4826d9c8b709beccda8b917540bca Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 5 Jul 2022 20:33:26 +0200 Subject: [PATCH 2/2] electron_19: init at 19.0.7 --- pkgs/development/tools/electron/default.nix | 11 ++++++++++- pkgs/development/tools/electron/generic.nix | 14 ++++++++------ pkgs/top-level/all-packages.nix | 3 ++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/electron/default.nix b/pkgs/development/tools/electron/default.nix index 1eb6144b4c3b..a1a593f522b5 100644 --- a/pkgs/development/tools/electron/default.nix +++ b/pkgs/development/tools/electron/default.nix @@ -23,7 +23,7 @@ let in rec { - electron = electron_18; + electron = electron_19; electron_9 = mkElectron "9.4.4" { x86_64-linux = "781d6ca834d415c71078e1c2c198faba926d6fce19e31448bbf4450869135450"; @@ -122,4 +122,13 @@ rec { aarch64-darwin = "97adf13306c9b3b304d3e9ddf68f5f7fb9b79c9a1342114e3671182f3cc9e808"; headers = "0gl30q2igr9c8sjlhyj5w57dm5navpkas5hnz9yl7sasbx66v10v"; }; + + electron_19 = mkElectron "19.0.7" { + armv7l-linux = "d6a6d2d7c0d658695783137d032a50f20843cdfe6582ef985451d741eef4dd32"; + aarch64-linux = "58685d21bb92c2667d20063ab12aabc2e5c2518f3eda84e98a0fa2306456ce57"; + x86_64-linux = "a4c20a068c54c238ae8c440ab8f46d39eda4168d6aa8cffcaae406800b539983"; + x86_64-darwin = "2709dd94e22ecfc8e7de0c7a7009160ed79e95ba91618c7307e24c26a33e978b"; + aarch64-darwin = "f9042bce83fe8446e22f6885285dd5fc2dca048d0b89cbf7f326a46102ffc440"; + headers = "09dbx4qh0rgp5mdm6srz6fgx12zq6b9jqq1k6l3gzyvwigi3wny1"; + }; } diff --git a/pkgs/development/tools/electron/generic.nix b/pkgs/development/tools/electron/generic.nix index 06440a80a4a9..6091fa902c77 100644 --- a/pkgs/development/tools/electron/generic.nix +++ b/pkgs/development/tools/electron/generic.nix @@ -27,8 +27,9 @@ let homepage = "https://github.com/electron/electron"; license = licenses.mit; maintainers = with maintainers; [ travisbhartwell manveru prusnak ]; - platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ] - ++ optionals (versionAtLeast version "11.0.0") [ "aarch64-darwin" ]; + platforms = [ "x86_64-darwin" "x86_64-linux" "armv7l-linux" "aarch64-linux" ] + ++ optionals (versionAtLeast version "11.0.0") [ "aarch64-darwin" ] + ++ optionals (versionOlder version "19.0.0") [ "i686-linux" ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; knownVulnerabilities = optional (versionOlder version "15.0.0") "Electron version ${version} is EOL"; }; @@ -44,16 +45,17 @@ let }; tags = { - i686-linux = "linux-ia32"; x86_64-linux = "linux-x64"; armv7l-linux = "linux-armv7l"; aarch64-linux = "linux-arm64"; x86_64-darwin = "darwin-x64"; - aarch64-darwin = "darwin-arm64"; + } // lib.optionalAttrs (lib.versionAtLeast version "11.0.0") { + aarch64-darwin = "darwin-arm64"; + } // lib.optionalAttrs (lib.versionOlder version "19.0.0") { + i686-linux = "linux-ia32"; }; - get = as: platform: as.${platform.system} or - "Unsupported system: ${platform.system}"; + get = as: platform: as.${platform.system} or (throw "Unsupported system: ${platform.system}"); common = platform: { inherit pname version meta; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c79431daf6bc..40e510d38a56 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15172,7 +15172,8 @@ with pkgs; electron_15 electron_16 electron_17 - electron_18; + electron_18 + electron_19; autobuild = callPackage ../development/tools/misc/autobuild { };