diff --git a/pkgs/development/tools/electron/generic.nix b/pkgs/development/tools/electron/generic.nix index 4e3f3511b96..ee3609783c2 100644 --- a/pkgs/development/tools/electron/generic.nix +++ b/pkgs/development/tools/electron/generic.nix @@ -33,6 +33,11 @@ let sha256 = hash; }; + headersFetcher = vers: hash: fetchurl { + url = "https://atom.io/download/electron/v${vers}/node-v${vers}-headers.tar.gz"; + sha256 = hash; + }; + tags = { i686-linux = "linux-ia32"; x86_64-linux = "linux-x64"; @@ -47,6 +52,7 @@ let common = platform: { inherit name version meta; src = fetcher version (get tags platform) (get hashes platform); + passthru.headers = headersFetcher version hashes.headers; }; electronLibPath = with stdenv.lib; makeLibraryPath ( diff --git a/pkgs/development/tools/electron/print-hashes.sh b/pkgs/development/tools/electron/print-hashes.sh index de380fd5223..d6c5d94ec41 100755 --- a/pkgs/development/tools/electron/print-hashes.sh +++ b/pkgs/development/tools/electron/print-hashes.sh @@ -20,6 +20,7 @@ SYSTEMS=( ) 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")" # Entry similar to the following goes in default.nix: @@ -30,4 +31,6 @@ for S in "${!SYSTEMS[@]}"; do echo " $S = \"$hash\";" done +echo " headers = \"$headers\";" + echo " };"