electron: passthru headers

This commit is contained in:
Jaka Hudoklin 2020-11-28 16:57:31 +01:00 committed by Pavol Rusnak
parent 428582c6b9
commit 9e779b0a43
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 9 additions and 0 deletions

@ -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 (

@ -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 " };"