2017-08-15 23:42:48 +02:00
|
|
|
{ stdenv, fetchurl, iodine, intltool, pkgconfig, networkmanager, libsecret
|
|
|
|
, withGnome ? true, gnome3 }:
|
|
|
|
|
2018-03-07 06:10:14 +01:00
|
|
|
let
|
2017-08-15 23:42:48 +02:00
|
|
|
pname = "NetworkManager-iodine";
|
2018-03-07 06:10:14 +01:00
|
|
|
version = "1.2.0";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2017-08-15 23:42:48 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-03-07 06:10:14 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2017-08-15 23:42:48 +02:00
|
|
|
sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ iodine networkmanager libsecret ]
|
2018-02-25 03:23:58 +01:00
|
|
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring
|
2017-08-15 23:42:48 +02:00
|
|
|
gnome3.networkmanagerapplet ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ intltool pkgconfig ];
|
|
|
|
|
2018-01-27 13:03:09 +01:00
|
|
|
# Fixes deprecation errors with networkmanager 1.10.2
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
|
|
|
|
|
2017-08-15 23:42:48 +02:00
|
|
|
configureFlags = [
|
|
|
|
"${if withGnome then "--with-gnome" else "--without-gnome"}"
|
|
|
|
"--disable-static"
|
|
|
|
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace "src/nm-iodine-service.c" \
|
|
|
|
--replace "/usr/bin/iodine" "${iodine}/bin/iodine"
|
|
|
|
'';
|
|
|
|
|
2018-03-07 06:10:14 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-iodine";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-08-15 23:42:48 +02:00
|
|
|
meta = {
|
|
|
|
description = "NetworkManager's iodine plugin";
|
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
|
|
|
};
|
|
|
|
}
|