summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-02-19 21:24:15 -0800
committerMichael Weiss <dev.primeos@gmail.com>2022-03-29 21:51:04 +0200
commitc4759273121db29fb732ccba69ede460fc2fbae6 (patch)
treec8ddc70fb4649bed583f187b8dbaace842853dba
parentb145c6c070f7d94b471c9288af8c7674349a274d (diff)
chromium: honor systemdSupport
This commit exposes that support for compilation without systemd, controlled by the global systemdSupport argument. This argument is understood by many other nixpkgs expressions and can be set globally in ~/.config/nixpkgs/config.nix. (cherry picked from commit 5f9ce130b2f99f6cc818428913b1929519757089)
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 9b18590817f8..a9532f517eb1 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -23,7 +23,7 @@
, libusb1, re2
, ffmpeg, libxslt, libxml2
, nasm
-, nspr, nss, systemd
+, nspr, nss
, util-linux, alsa-lib
, bison, gperf, libkrb5
, glib, gtk3, dbus-glib
@@ -47,6 +47,8 @@
, ungoogled ? false, ungoogled-chromium
# Optional dependencies:
, libgcrypt ? null # gnomeSupport || cupsSupport
+, systemdSupport ? stdenv.isLinux
+, systemd
}:
buildFun:
@@ -139,7 +141,7 @@ let
libusb1 re2
ffmpeg libxslt libxml2
nasm
- nspr nss systemd
+ nspr nss
util-linux alsa-lib
bison gperf libkrb5
glib gtk3 dbus-glib
@@ -151,7 +153,8 @@ let
libdrm wayland mesa.drivers libxkbcommon
curl
libepoxy
- ] ++ optionals gnomeSupport [ gnome2.GConf libgcrypt ]
+ ] ++ optional systemdSupport systemd
+ ++ optionals gnomeSupport [ gnome2.GConf libgcrypt ]
++ optional gnomeKeyringSupport libgnome-keyring3
++ optionals cupsSupport [ libgcrypt cups ]
++ optional pulseSupport libpulseaudio;
@@ -204,9 +207,10 @@ let
sed -i -e 's@"\(#!\)\?.*xdg-@"\1${xdg-utils}/bin/xdg-@' \
chrome/browser/shell_integration_linux.cc
+ '' + lib.optionalString systemdSupport ''
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
device/udev_linux/udev?_loader.cc
-
+ '' + ''
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
gpu/config/gpu_info_collector_linux.cc