mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-12 15:37:47 +03:00
electron{,-bin}: add passthru.dist attribute
This commit is contained in:
parent
1a88164cc0
commit
6ca8d9b06f
@ -107,7 +107,7 @@ let
|
||||
++ lib.optionals (lib.versionAtLeast version "17.0.0") [ libGL vulkan-loader ]
|
||||
);
|
||||
|
||||
linux = {
|
||||
linux = finalAttrs: {
|
||||
buildInputs = [ glib gtk3 ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -142,9 +142,11 @@ let
|
||||
rm "$out/libexec/electron/libvulkan.so.1"
|
||||
ln -s -t "$out/libexec/electron" "${lib.getLib vulkan-loader}/lib/libvulkan.so.1"
|
||||
'';
|
||||
|
||||
passthru.dist = finalAttrs.finalPackage + "/libexec/electron";
|
||||
};
|
||||
|
||||
darwin = {
|
||||
darwin = finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
unzip
|
||||
@ -157,9 +159,12 @@ let
|
||||
mkdir -p $out/bin
|
||||
makeWrapper $out/Applications/Electron.app/Contents/MacOS/Electron $out/bin/electron
|
||||
'';
|
||||
|
||||
passthru.dist = finalAttrs.finalPackage + "/Applications";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (
|
||||
(common stdenv.hostPlatform) //
|
||||
(if stdenv.isDarwin then darwin else linux)
|
||||
stdenv.mkDerivation (finalAttrs:
|
||||
lib.recursiveUpdate
|
||||
(common stdenv.hostPlatform)
|
||||
((if stdenv.isDarwin then darwin else linux) finalAttrs)
|
||||
)
|
||||
|
@ -27,7 +27,7 @@ let
|
||||
|
||||
fetchedDeps = lib.mapAttrs (name: fetchdep) info.deps;
|
||||
|
||||
in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
|
||||
in ((chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
|
||||
packageName = "electron";
|
||||
inherit (info) version;
|
||||
buildTargets = [ "electron:electron_dist_zip" ];
|
||||
@ -244,4 +244,9 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
|
||||
hydraPlatforms = lib.optionals (!(hasInfix "alpha" info.version) && !(hasInfix "beta" info.version)) ["aarch64-linux" "x86_64-linux"];
|
||||
timeout = 172800; # 48 hours (increased from the Hydra default of 10h)
|
||||
};
|
||||
})).overrideAttrs (finalAttrs: prevAttrs: {
|
||||
# this was the only way I could get the package to properly reference itself
|
||||
passthru = prevAttrs.passthru // {
|
||||
dist = finalAttrs.finalPackage + "/libexec/electron";
|
||||
};
|
||||
})
|
||||
|
@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
||||
|
||||
passthru = {
|
||||
unwrapped = electron-unwrapped;
|
||||
inherit (electron-unwrapped) headers;
|
||||
inherit (electron-unwrapped) headers dist;
|
||||
};
|
||||
inherit (electron-unwrapped) meta;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user