nixpkgs/pkgs/tools/networking/network-manager/iodine.nix
2017-08-30 02:58:29 +02:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchurl, iodine, intltool, pkgconfig, networkmanager, libsecret
, withGnome ? true, gnome3 }:
stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-iodine";
major = "1.2";
version = "${major}.0";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
};
buildInputs = [ iodine networkmanager libsecret ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring
gnome3.networkmanagerapplet ];
nativeBuildInputs = [ intltool pkgconfig ];
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"
'';
meta = {
description = "NetworkManager's iodine plugin";
inherit (networkmanager.meta) maintainers platforms;
};
}