-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
networkmanager: port to Meson #59916
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
Conversation
gobject-introspection uses glib’s g_module_open function, which in turn relies on dlopen. I also implemented openat, since I initially thought this function was used but turns out dlopen uses the openat signal directly. We might as well keep it, even thought I do not need it at the moment.
This should go to staging instead of master, right? |
Yay same, hail meson (bows graciously) @jtojnar Review incoming sometime tomorrow |
"-Dmodem_manager=true" | ||
"-Dnmtui=true" | ||
"-Ddocs=true" | ||
"-Dlibnm_glib=true" # legacy library, TODO: remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What in nixpkgs still needs this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is hard to determine since programs may use the typelib at runtime, but since GNOME depended on it until 3.26 (IIRC), I would think all the GNOME forks like MATE will still require it.
]; | ||
|
||
buildInputs = [ | ||
systemd libuuid polkit ppp libndp curl | ||
systemd libselinux audit libpsl libuuid polkit ppp libndp curl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want selinux
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually try to have the largest broadest set of features that builds and there is some interest in SELinux in Nix. It does not really affect closure size much (Δ < 1M) but if there are some downsides we can remove it, sure.
meson + selinux: 403727760
meson: 403141328
autotools: 413526024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes sense. I don't know how SELinux works, but does enabling it without support in NixOS cause problems? If not this is fine.
All hail Meson! One serious issue is that building docs does not work. We patch gobject-introspection to use absolute paths for shared libraries in GIR files. Building the NetworkManager docs relies on the produced introspection data but since the library is not yet installed at the time the docs are generated, the build will fail. It works in Autotools for some reason; they probably use the pregenerated GIRs from the tarball. Disabling the docs completely is not possible at the moment either, since nmc [depends on them][1]. I have decided to fix this by pointing the installed location to the one in the build directory using libredirect. Unfortunately, we cannot just set the environment variables directly, since the build system runs the documentation generator in a clean environment. I have also added man, doc and devdoc outputs so the generated files have somewhere to go. Secondly, since Nix store is immutable, we also cannot use the package prefix for configuration and mutable state data. At the same time, we cannot write to the appropriate global directories during build. Autotools allowed to change this in installFlags but Meson lacks similar mechanism so we need to patch the build files. Finally, I also removed the at_console patch since the permission has been removed in 0.9.10. [1]: https://bugzilla.gnome.org/show_bug.cgi?id=796755
Motivation for this change
All hail Meson!
See the commit messages for details.
Things done
I checked that the outputs still match: The
man
anddoc
were moved to separate outputs, Vapi was added todev
output,devdoc
were added, libtool files were removed fromout
.I also opened the docs in Devhelp but they suffer from the common
about:blank
bug:env XDG_DATA_DIRS=$(nix-build -A networkmanager.devdoc --no-link)/share GTK3_MODULES= devhelp
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)