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

55 lines
1.6 KiB
Nix
Raw Normal View History

2019-02-13 21:47:50 +00:00
{ stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret, gtk3
, withGnome ? true, gnome3, fetchpatch, networkmanagerapplet }:
2017-08-15 21:42:48 +00:00
let
2018-08-09 14:52:41 +00:00
pname = "NetworkManager-iodine";
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;
})
# 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 ]
++ stdenv.lib.optionals withGnome [ gtk3 libsecret networkmanagerapplet ];
2017-08-15 21:42:48 +00:00
nativeBuildInputs = [ intltool pkgconfig ];
# 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 = [
"--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
"--enable-absolute-paths"
2017-08-15 21:42:48 +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
};
}