2019-02-13 21:47:50 +00:00
|
|
|
{ stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret, gtk3
|
2019-09-16 03:48:34 +00:00
|
|
|
, withGnome ? true, gnome3, fetchpatch }:
|
2017-08-15 21:42:48 +00:00
|
|
|
|
2018-03-07 05:10:14 +00:00
|
|
|
let
|
2018-08-09 14:52:41 +00:00
|
|
|
pname = "NetworkManager-iodine";
|
2018-03-07 05:10:14 +00:00
|
|
|
version = "1.2.0";
|
2019-08-13 21:52:01 +00:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-09 14:52:41 +00:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2017-08-15 21:42:48 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-09 14:52:41 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2017-08-15 21:42:48 +00:00
|
|
|
sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
|
|
|
|
};
|
|
|
|
|
2018-08-09 14:52:41 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit iodine;
|
|
|
|
})
|
2019-09-16 03:48:34 +00:00
|
|
|
# Don't use etc/dbus-1/system.d
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/network-manager-iodine/merge_requests/2.patch";
|
|
|
|
sha256 = "108pkf0mddj32s46k7jkmpwcaq2ylci4dqpp7wck3zm9q2jffff2";
|
|
|
|
})
|
2018-08-09 14:52:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ iodine networkmanager ]
|
2019-02-13 21:47:50 +00:00
|
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret gnome3.networkmanagerapplet ];
|
2017-08-15 21:42:48 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ intltool pkgconfig ];
|
|
|
|
|
2019-09-04 11:24:13 +00:00
|
|
|
# glib-2.62 deprecations
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
|
2018-01-27 12:03:09 +00:00
|
|
|
|
2017-08-15 21:42:48 +00:00
|
|
|
configureFlags = [
|
2018-08-28 12:59:16 +00:00
|
|
|
"--without-libnm-glib"
|
2018-08-09 14:52:41 +00:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2017-08-15 21:42:48 +00:00
|
|
|
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
2018-09-23 10:53:46 +00:00
|
|
|
"--enable-absolute-paths"
|
2017-08-15 21:42:48 +00:00
|
|
|
];
|
|
|
|
|
2018-03-07 05:10:14 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-iodine";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-09 14:52:41 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-15 21:42:48 +00:00
|
|
|
description = "NetworkManager's iodine plugin";
|
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 14:52:41 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2017-08-15 21:42:48 +00:00
|
|
|
};
|
|
|
|
}
|