nixpkgs/pkgs/tools/networking/network-manager/iodine/default.nix

59 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitLab, substituteAll, autoreconfHook, iodine, intltool, pkgconfig, networkmanager, libsecret, gtk3
2020-03-16 01:18:44 +01:00
, withGnome ? true, gnome3, fetchpatch, libnma }:
2017-08-15 23:42:48 +02:00
let
2018-08-09 16:52:41 +02:00
pname = "NetworkManager-iodine";
version = "unstable-2019-11-05";
2019-08-13 23:52:01 +02:00
in stdenv.mkDerivation {
2018-08-09 16:52:41 +02:00
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
2017-08-15 23:42:48 +02:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "network-manager-iodine";
rev = "2ef0abf089b00a0546f214dde0d45e63f2990b79";
sha256 = "1ps26fr9b1yyafj7lrzf2kmaxb0ipl0mhagch5kzrjdsc5xkajz7";
2017-08-15 23:42:48 +02:00
};
2018-08-09 16:52:41 +02:00
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit iodine;
})
# 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 16:52:41 +02:00
];
buildInputs = [ iodine networkmanager ]
2020-03-16 01:18:44 +01:00
++ stdenv.lib.optionals withGnome [ gtk3 libsecret libnma ];
2017-08-15 23:42:48 +02:00
nativeBuildInputs = [ intltool autoreconfHook pkgconfig ];
2017-08-15 23:42:48 +02:00
# glib-2.62 deprecations
2019-10-30 02:29:30 +01:00
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
2018-01-27 13:03:09 +01:00
preConfigure = "intltoolize";
2017-08-15 23:42:48 +02:00
configureFlags = [
"--without-libnm-glib"
2018-08-09 16:52:41 +02:00
"--with-gnome=${if withGnome then "yes" else "no"}"
2017-08-15 23:42:48 +02:00
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
"--enable-absolute-paths"
2017-08-15 23:42:48 +02:00
];
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "networkmanager-iodine";
};
};
2018-08-09 16:52:41 +02:00
meta = with stdenv.lib; {
2017-08-15 23:42:48 +02:00
description = "NetworkManager's iodine plugin";
inherit (networkmanager.meta) maintainers platforms;
2018-08-09 16:52:41 +02:00
license = licenses.gpl2Plus;
2017-08-15 23:42:48 +02:00
};
}