networkmanager-iodine: clean up
This commit is contained in:
parent
3fa8a478e3
commit
cb32ca2645
@ -1,20 +1,26 @@
|
|||||||
{ stdenv, fetchurl, iodine, intltool, pkgconfig, networkmanager, libsecret
|
{ stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret
|
||||||
, withGnome ? true, gnome3 }:
|
, withGnome ? true, gnome3 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "NetworkManager-iodine";
|
pname = "NetworkManager-iodine";
|
||||||
version = "1.2.0";
|
version = "1.2.0";
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
|
sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ iodine networkmanager libsecret ]
|
patches = [
|
||||||
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring
|
(substituteAll {
|
||||||
gnome3.networkmanagerapplet ];
|
src = ./fix-paths.patch;
|
||||||
|
inherit iodine;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ iodine networkmanager ]
|
||||||
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk libsecret gnome3.networkmanagerapplet ];
|
||||||
|
|
||||||
nativeBuildInputs = [ intltool pkgconfig ];
|
nativeBuildInputs = [ intltool pkgconfig ];
|
||||||
|
|
||||||
@ -22,16 +28,10 @@ in stdenv.mkDerivation rec {
|
|||||||
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
|
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"${if withGnome then "--with-gnome" else "--without-gnome"}"
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
||||||
"--disable-static"
|
|
||||||
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
"--localstatedir=/" # needed for the management socket under /run/NetworkManager
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
substituteInPlace "src/nm-iodine-service.c" \
|
|
||||||
--replace "/usr/bin/iodine" "${iodine}/bin/iodine"
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gnome3.updateScript {
|
updateScript = gnome3.updateScript {
|
||||||
packageName = pname;
|
packageName = pname;
|
||||||
@ -39,8 +39,9 @@ in stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "NetworkManager's iodine plugin";
|
description = "NetworkManager's iodine plugin";
|
||||||
inherit (networkmanager.meta) maintainers platforms;
|
inherit (networkmanager.meta) maintainers platforms;
|
||||||
|
license = licenses.gpl2Plus;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
11
pkgs/tools/networking/network-manager/iodine/fix-paths.patch
Normal file
11
pkgs/tools/networking/network-manager/iodine/fix-paths.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/nm-iodine-service.c
|
||||||
|
+++ b/src/nm-iodine-service.c
|
||||||
|
@@ -62,7 +62,7 @@
|
||||||
|
|
||||||
|
static const char *iodine_binary_paths[] =
|
||||||
|
{
|
||||||
|
- "/usr/bin/iodine",
|
||||||
|
+ "@iodine@/bin/iodine",
|
||||||
|
"/usr/sbin/iodine",
|
||||||
|
"/usr/local/bin/iodine",
|
||||||
|
"/usr/local/sbin/iodine",
|
Loading…
x
Reference in New Issue
Block a user