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

48 lines
1.3 KiB
Nix
Raw Normal View History

2018-08-09 14:52:41 +00:00
{ stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret
2017-08-15 21:42:48 +00:00
, withGnome ? true, gnome3 }:
let
2018-08-09 14:52:41 +00:00
pname = "NetworkManager-iodine";
version = "1.2.0";
in stdenv.mkDerivation rec {
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;
})
];
buildInputs = [ iodine networkmanager ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk libsecret gnome3.networkmanagerapplet ];
2017-08-15 21:42:48 +00:00
nativeBuildInputs = [ intltool pkgconfig ];
2018-01-27 12:03:09 +00:00
# Fixes deprecation errors with networkmanager 1.10.2
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
2017-08-15 21:42:48 +00:00
configureFlags = [
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
];
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
};
}