depot/pkgs/development/tools/electron/wrapper.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

37 lines
849 B
Nix

{ stdenv
, electron-unwrapped
, wrapGAppsHook3
, makeWrapper
, gsettings-desktop-schemas
, glib
, gtk3
, gtk4
}:
stdenv.mkDerivation {
pname = "electron";
inherit (electron-unwrapped) version;
nativeBuildInputs = [ wrapGAppsHook3 makeWrapper ];
buildInputs = [
# needed for GSETTINGS_SCHEMAS_PATH
gsettings-desktop-schemas glib gtk3 gtk4
];
dontWrapGApps = true;
buildCommand = ''
gappsWrapperArgsHook
mkdir -p $out/bin
makeWrapper "${electron-unwrapped}/libexec/electron/electron" "$out/bin/electron" \
"''${gappsWrapperArgs[@]}" \
--set CHROME_DEVEL_SANDBOX $out/libexec/electron/chrome-sandbox
ln -s ${electron-unwrapped}/libexec $out/libexec
'';
passthru = {
unwrapped = electron-unwrapped;
inherit (electron-unwrapped) headers dist;
};
inherit (electron-unwrapped) meta;
}