Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libproxy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
, cmake
, zlib
, dbus
, networkmanager
, libnm
, enableJavaScript ? stdenv.isDarwin || lib.meta.availableOn stdenv.hostPlatform duktape
, duktape
, pcre
Expand Down Expand Up @@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
] else [
glib
dbus
networkmanager
libnm
]);

cmakeFlags = [
Expand Down
26 changes: 18 additions & 8 deletions pkgs/tools/networking/networkmanager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
, mobile-broadband-provider-info
, runtimeShell
, buildPackages
, libnmOnly ? false
}:

let
Expand Down Expand Up @@ -91,8 +92,8 @@ stdenv.mkDerivation rec {
"-Dpppd=${ppp}/bin/pppd"
"-Diptables=${iptables}/bin/iptables"
"-Dnft=${nftables}/bin/nft"
"-Dmodem_manager=true"
"-Dnmtui=true"
(lib.mesonBool "modem_manager" (!libnmOnly))
(lib.mesonBool "nmtui" (!libnmOnly))
"-Ddnsmasq=${dnsmasq}/bin/dnsmasq"
"-Dqt=false"

Expand Down Expand Up @@ -145,15 +146,18 @@ stdenv.mkDerivation rec {
ppp
libndp
curl
mobile-broadband-provider-info
jansson
dbus # used to get directory paths with pkg-config during configuration
] ++ lib.optionals (!libnmOnly) [
# for nmtui
newt
readline
# for plugins
bluez5
dnsmasq
modemmanager
readline
newt
libsoup
jansson
dbus # used to get directory paths with pkg-config during configuration
mobile-broadband-provider-info
modemmanager
Comment on lines +152 to +160
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved most plugin dependencies out here, so build and runtime closure size should both be significant smaller now.

];

propagatedBuildInputs = [ gnutls libgcrypt ];
Expand Down Expand Up @@ -199,6 +203,12 @@ stdenv.mkDerivation rec {
ln -s $PWD/src/libnm-client-impl/libnm.so.0 ${placeholder "out"}/lib/libnm.so.0
'';

# upstream does not offer a way to only compile libnm and we cannot just move libnm to a different output
# without regenerating the git files
postInstall = lib.optionalString libnmOnly ''
rm -rf $out/{,s}bin/
'';

postFixup = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
cp -r ${buildPackages.networkmanager.devdoc} $devdoc
cp -r ${buildPackages.networkmanager.man} $man
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10687,6 +10687,8 @@ with pkgs;

networkmanager = callPackage ../tools/networking/networkmanager { };

libnm = networkmanager.override { libnmOnly = true; };

networkmanager-iodine = callPackage ../tools/networking/networkmanager/iodine { };

networkmanager-openvpn = callPackage ../tools/networking/networkmanager/openvpn { };
Expand Down