forked from NixOS/nixpkgs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d077029
commit 0daf285
Showing
4 changed files
with
149 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
pkgs/tools/networking/network-manager/0001-build-add-PPPD_PATH-to-config.h.meson.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 0bfd538d685644b224beab1e71d08f038908d414 Mon Sep 17 00:00:00 2001 | ||
From: worldofpeace <worldofpeace@protonmail.ch> | ||
Date: Thu, 31 Oct 2019 07:56:36 -0400 | ||
Subject: [PATCH] build: add PPPD_PATH to config.h.meson | ||
|
||
Without this using -Dpppd= was completely broken. | ||
|
||
First observed in NixOS [0] | ||
|
||
[0]: https://github.com/NixOS/nixpkgs/issues/72330 | ||
--- | ||
config.h.meson | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/config.h.meson b/config.h.meson | ||
index c8f980552..e7e117edc 100644 | ||
--- a/config.h.meson | ||
+++ b/config.h.meson | ||
@@ -218,6 +218,9 @@ | ||
/* Define if you have PPP support */ | ||
#mesondefine WITH_PPP | ||
|
||
+/* Define to path of pppd binary */ | ||
+#mesondefine PPPD_PATH | ||
+ | ||
/* Whether compilation of ibft setting plugin is enabled */ | ||
#mesondefine WITH_SETTINGS_PLUGIN_IBFT | ||
|
||
-- | ||
2.23.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ stdenv, fetchurl, substituteAll, intltool, pkgconfig, dbus, dbus-glib | ||
, gnome3, systemd, libuuid, polkit, gnutls, ppp, dhcp, iptables, python3, vala | ||
, libgcrypt, dnsmasq, bluez5, readline, libselinux, audit | ||
, gobject-introspection, modemmanager, openresolv, libndp, newt, libsoup | ||
, ethtool, gnused, iputils, kmod, jansson, gtk-doc, libxslt | ||
, docbook_xsl, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43 | ||
, openconnect, curl, meson, ninja, libpsl }: | ||
|
||
let | ||
pythonForDocs = python3.withPackages (pkgs: with pkgs; [ pygobject3 ]); | ||
in stdenv.mkDerivation rec { | ||
pname = "network-manager"; | ||
version = "1.18.4"; | ||
|
||
src = fetchurl { | ||
url = "mirror://gnome/sources/NetworkManager/${stdenv.lib.versions.majorMinor version}/NetworkManager-${version}.tar.xz"; | ||
sha256 = "0pnh1wr2p1fqa5pr945fr3lngfc5ccfrmgddqsg55lxnjpv0ggd3"; | ||
}; | ||
|
||
outputs = [ "out" "dev" "devdoc" "man" "doc" ]; | ||
|
||
# Right now we hardcode quite a few paths at build time. Probably we should | ||
# patch networkmanager to allow passing these path in config file. This will | ||
# remove unneeded build-time dependencies. | ||
mesonFlags = [ | ||
"-Ddhclient=${dhcp}/bin/dhclient" | ||
"-Ddnsmasq=${dnsmasq}/bin/dnsmasq" | ||
# Upstream prefers dhclient, so don't add dhcpcd to the closure | ||
"-Ddhcpcd=no" | ||
"-Ddhcpcanon=no" | ||
"-Dpppd=${ppp}/bin/pppd" | ||
"-Diptables=${iptables}/bin/iptables" | ||
# to enable link-local connections | ||
"-Dudev_dir=${placeholder "out"}/lib/udev" | ||
"-Dresolvconf=${openresolv}/bin/resolvconf" | ||
"-Ddbus_conf_dir=${placeholder "out"}/etc/dbus-1/system.d" | ||
"-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system" | ||
"-Dkernel_firmware_dir=/run/current-system/firmware" | ||
"--sysconfdir=/etc" | ||
"--localstatedir=/var" | ||
"-Dcrypto=gnutls" | ||
"-Dsession_tracking=systemd" | ||
"-Dmodem_manager=true" | ||
"-Dnmtui=true" | ||
"-Ddocs=true" | ||
# TODO: legacy library, will be *removed* in next release! | ||
"-Dlibnm_glib=true" | ||
"-Dtests=no" | ||
"-Dqt=false" | ||
# Allow using iwd when configured to do so | ||
"-Diwd=true" | ||
"-Dlibaudit=yes-disabled-by-default" | ||
]; | ||
|
||
patches = [ | ||
(substituteAll { | ||
src = ./fix-paths.patch; | ||
inherit iputils kmod openconnect ethtool gnused dbus; | ||
inherit (stdenv) shell; | ||
}) | ||
|
||
# Meson does not support using different directories during build and | ||
# for installation like Autotools did with flags passed to make install. | ||
./fix-install-paths.patch | ||
|
||
./0001-build-add-PPPD_PATH-to-config.h.meson.patch | ||
]; | ||
|
||
buildInputs = [ | ||
systemd libselinux audit libpsl libuuid polkit ppp libndp curl | ||
bluez5 dnsmasq gobject-introspection modemmanager readline newt libsoup jansson | ||
]; | ||
|
||
propagatedBuildInputs = [ dbus-glib gnutls libgcrypt ]; | ||
|
||
nativeBuildInputs = [ | ||
meson ninja intltool pkgconfig | ||
vala gobject-introspection | ||
dbus-glib # for dbus-binding-tool | ||
# Docs | ||
gtk-doc libxslt docbook_xsl docbook_xml_dtd_412 docbook_xml_dtd_42 docbook_xml_dtd_43 pythonForDocs | ||
]; | ||
|
||
doCheck = false; # requires /sys, the net | ||
|
||
|
||
postPatch = '' | ||
patchShebangs ./tools | ||
patchShebangs libnm/generate-setting-docs.py | ||
''; | ||
|
||
preBuild = '' | ||
# Our gobject-introspection patches make the shared library paths absolute | ||
# in the GIR files. When building docs, the library is not yet installed, | ||
# though, so we need to replace the absolute path with a local one during build. | ||
# We are using a symlink that will be overridden during installation. | ||
mkdir -p ${placeholder "out"}/lib | ||
ln -s $PWD/libnm/libnm.so.0 ${placeholder "out"}/lib/libnm.so.0 | ||
''; | ||
|
||
passthru = { | ||
updateScript = gnome3.updateScript { | ||
packageName = pname; | ||
attrPath = "networkmanager"; | ||
}; | ||
}; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://wiki.gnome.org/Projects/NetworkManager; | ||
description = "Network configuration and management tool"; | ||
license = licenses.gpl2Plus; | ||
maintainers = with maintainers; [ phreedom domenkozar obadz ]; | ||
platforms = platforms.linux; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters