Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbus: enable building with musl #71560

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

cdepillabout
Copy link
Member

When building dbus with musl, it must not take systemd as a buildInput, because systemd is not able to be built with musl.

Motivation for this change

This is from nh2/static-haskell-nix#50. In that issue, I was trying to get vte built using pkgsMusl. vte transitively depends on dbus, which can't be built with a systemd dependency, since systemd can't be compiled with musl.

In order to check this you can run the following command:

$ nix-build -A pkgsMusl.dbus
...
/nix/store/g9hs0syglgv1f9cgmv1naqrx4vsqzm3x-dbus-1.12.16
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/) they all seem to at least run somewhat
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @nh2 @domenkozar

@cdepillabout
Copy link
Member Author

@GrahamcOfBorg build dbus pkgsMusl.dbus

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Oct 21, 2019
@cdepillabout
Copy link
Member Author

This is related to the following three PRs:

@worldofpeace worldofpeace self-requested a review October 22, 2019 03:52
When building dbus with musl, it must not take systemd as a buildInput,
because systemd is not able to be build with musl.
@cdepillabout cdepillabout force-pushed the dbus-enable-building-with-musl branch from b3e7779 to 7ada1d9 Compare October 22, 2019 10:12
@@ -3,6 +3,7 @@
, fetchurl
, pkgconfig
, expat
, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
, systemd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I set systemd to systemd ? null as it is done for libusb1?

https://github.com/NixOS/nixpkgs/pull/71563/files#diff-81a3f0c1548ebc7ea522eb8c443aaa01R5

@cdepillabout
Copy link
Member Author

In 7ada1d9 I changed this to take an enableSystemd argument as suggested in #71575 (comment).

@nh2
Copy link
Contributor

nh2 commented Oct 28, 2019

This has worked fine for me in static-haskell-nix so far, and no changes for non-musl; merging.

@nh2 nh2 merged commit b72984e into NixOS:master Oct 28, 2019
@cdepillabout cdepillabout deleted the dbus-enable-building-with-musl branch October 28, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants