This commit is contained in:
@@ -17,15 +17,44 @@
|
|||||||
gnugrep,
|
gnugrep,
|
||||||
callPackage,
|
callPackage,
|
||||||
rustc,
|
rustc,
|
||||||
|
runCommand,
|
||||||
|
widevine-cdm,
|
||||||
|
enableWideVine ? false,
|
||||||
|
proprietaryCodecs ? true,
|
||||||
|
cupsSupport ? true,
|
||||||
|
pulseSupport ? stdenv.hostPlatform.isLinux,
|
||||||
|
commandLineArgs ? "",
|
||||||
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
upstream-info = (lib.importJSON ./info.json)."ungoogled-chromium";
|
upstream-info = (lib.importJSON ./info.json)."ungoogled-chromium";
|
||||||
unwrapped = callPackage ./unwrapped.nix {
|
unwrapped = callPackage ./unwrapped.nix {
|
||||||
inherit helium-patcher-unwrapped upstream-info;
|
inherit
|
||||||
|
helium-patcher-unwrapped
|
||||||
|
upstream-info
|
||||||
|
proprietaryCodecs
|
||||||
|
cupsSupport
|
||||||
|
pulseSupport
|
||||||
|
;
|
||||||
stdenv = rustc.llvmPackages.stdenv;
|
stdenv = rustc.llvmPackages.stdenv;
|
||||||
};
|
};
|
||||||
helium-patcher-unwrapped = callPackage ./helium-patcher.nix { };
|
helium-patcher-unwrapped = callPackage ./helium-patcher.nix { };
|
||||||
sandboxExecutableName = unwrapped.passthru.sandboxExecutableName;
|
sandboxExecutableName = unwrapped.passthru.sandboxExecutableName;
|
||||||
|
|
||||||
|
chromiumWV =
|
||||||
|
let
|
||||||
|
browser = unwrapped;
|
||||||
|
in
|
||||||
|
if enableWideVine then
|
||||||
|
runCommand (browser.name + "-wv") { version = browser.version; } ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -a ${browser}/* $out/
|
||||||
|
chmod u+w $out/libexec/chromium
|
||||||
|
cp -a ${widevine-cdm}/share/google/chrome/WidevineCdm $out/libexec/chromium/
|
||||||
|
''
|
||||||
|
else
|
||||||
|
browser;
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "helium-browser";
|
pname = "helium-browser";
|
||||||
@@ -57,7 +86,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildCommand =
|
buildCommand =
|
||||||
let
|
let
|
||||||
browserBinary = "${unwrapped}/libexec/helium/helium";
|
browserBinary = "${chromiumWV}/libexec/helium/helium";
|
||||||
libPath = lib.makeLibraryPath [
|
libPath = lib.makeLibraryPath [
|
||||||
libva
|
libva
|
||||||
pipewire
|
pipewire
|
||||||
@@ -73,7 +102,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
makeWrapper "${browserBinary}" "$out/bin/helium" \
|
makeWrapper "${browserBinary}" "$out/bin/helium" \
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
||||||
|
--add-flags ${lib.escapeShellArg commandLineArgs}
|
||||||
ed -v -s "$out/bin/helium" << EOF
|
ed -v -s "$out/bin/helium" << EOF
|
||||||
2i
|
2i
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,10 @@
|
|||||||
electron-source,
|
electron-source,
|
||||||
helium-patcher-unwrapped,
|
helium-patcher-unwrapped,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
|
|
||||||
|
proprietaryCodecs,
|
||||||
|
cupsSupport,
|
||||||
|
pulseSupport,
|
||||||
}:
|
}:
|
||||||
(
|
(
|
||||||
(chromium.passthru.mkDerivation.override (
|
(chromium.passthru.mkDerivation.override (
|
||||||
@@ -44,7 +48,14 @@
|
|||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
ungoogled = true;
|
ungoogled = true;
|
||||||
ungoogled-chromium = helium-patcher-unwrapped;
|
ungoogled-chromium = helium-patcher-unwrapped;
|
||||||
inherit upstream-info chromiumVersionAtLeast versionRange;
|
inherit
|
||||||
|
upstream-info
|
||||||
|
chromiumVersionAtLeast
|
||||||
|
versionRange
|
||||||
|
proprietaryCodecs
|
||||||
|
cupsSupport
|
||||||
|
pulseSupport
|
||||||
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user