Skip to content

Commit

Permalink
Merge pull request #308830 from tie/systemd-macos-sandbox
Browse files Browse the repository at this point in the history
systemd: fix build in macOS sandbox
  • Loading branch information
flokli committed May 25, 2024
2 parents edcb881 + 09cb8b1 commit 032c429
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,12 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonOption "default-hierarchy" "unified")
(lib.mesonOption "kmod-path" "${kmod}/bin/kmod")

# Attempts to check /usr/sbin and that fails in macOS sandbox because
# permission is denied. If /usr/sbin is not a symlink, it defaults to true.
# We set it to false since stdenv moves sbin/* to bin and creates a symlink,
# that is, we do not have split bin.
(lib.mesonOption "split-bin" "false")

# D-Bus
(lib.mesonOption "dbuspolicydir" "${placeholder "out"}/share/dbus-1/system.d")
(lib.mesonOption "dbussessionservicedir" "${placeholder "out"}/share/dbus-1/services")
Expand Down Expand Up @@ -815,6 +821,9 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace $i --replace /bin/false ${coreutils}/bin/false
done
# For compatibility with dependents that use sbin instead of bin.
ln -s bin "$out/sbin"
rm -rf $out/etc/rpm
'' + lib.optionalString (!withKernelInstall) ''
# "kernel-install" shouldn't be used on NixOS.
Expand Down

0 comments on commit 032c429

Please sign in to comment.