git.iko.soy/typeable/nixpkgs
on master help sign in
networkmanager-iodine: clean up
cb32ca2Jan Tojnar
pkgs/tools/networking/network-manager/iodine/default.nix+16−15
@@ -1,20 +1,26 @@
1−{ stdenv, fetchurl, iodine, intltool, pkgconfig, networkmanager, libsecret
1+{ stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret
2, withGnome ? true, gnome3 }:
2, withGnome ? true, gnome3 }:
3
3
4let
4let
5− pname = "NetworkManager-iodine";
5+ pname = "NetworkManager-iodine";
6 version = "1.2.0";
6 version = "1.2.0";
7in stdenv.mkDerivation rec {
7in stdenv.mkDerivation rec {
8− name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
8+ name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
9
9
10 src = fetchurl {
10 src = fetchurl {
11− url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
11+ url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
12 sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
12 sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh";
13 };
13 };
14
14
15+ patches = [
16+ (substituteAll {
17+ src = ./fix-paths.patch;
18+ inherit iodine;
19+ })
20+ ];
21+
15− buildInputs = [ iodine networkmanager libsecret ]
22+ buildInputs = [ iodine networkmanager ]
16− ++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring
23+ ++ stdenv.lib.optionals withGnome [ gnome3.gtk libsecret gnome3.networkmanagerapplet ];
17− gnome3.networkmanagerapplet ];
18
24
19 nativeBuildInputs = [ intltool pkgconfig ];
25 nativeBuildInputs = [ intltool pkgconfig ];
20
26
@@ -22,16 +28,10 @@ in stdenv.mkDerivation rec {
22 NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
28 NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
23
29
24 configureFlags = [
30 configureFlags = [
25− "${if withGnome then "--with-gnome" else "--without-gnome"}"
31+ "--with-gnome=${if withGnome then "yes" else "no"}"
26− "--disable-static"
27 "--localstatedir=/" # needed for the management socket under /run/NetworkManager
32 "--localstatedir=/" # needed for the management socket under /run/NetworkManager
28 ];
33 ];
29
34
30− preConfigure = ''
31− substituteInPlace "src/nm-iodine-service.c" \
32− --replace "/usr/bin/iodine" "${iodine}/bin/iodine"
33− '';
34−
35 passthru = {
35 passthru = {
36 updateScript = gnome3.updateScript {
36 updateScript = gnome3.updateScript {
37 packageName = pname;
37 packageName = pname;
@@ -39,8 +39,9 @@ in stdenv.mkDerivation rec {
39 };
39 };
40 };
40 };
41
41
42− meta = {
42+ meta = with stdenv.lib; {
43 description = "NetworkManager's iodine plugin";
43 description = "NetworkManager's iodine plugin";
44 inherit (networkmanager.meta) maintainers platforms;
44 inherit (networkmanager.meta) maintainers platforms;
45+ license = licenses.gpl2Plus;
45 };
46 };
46}
47}
pkgs/tools/networking/network-manager/iodine/fix-paths.patchnew file+11
@@ -0,0 +1,11 @@
1+--- a/src/nm-iodine-service.c
2++++ b/src/nm-iodine-service.c
3+@@ -62,7 +62,7 @@
4+
5+ static const char *iodine_binary_paths[] =
6+ {
7+- "/usr/bin/iodine",
8++ "@iodine@/bin/iodine",
9+ "/usr/sbin/iodine",
10+ "/usr/local/bin/iodine",
11+ "/usr/local/sbin/iodine",