networkmanager-iodine: clean up

+27 -15
+16 -15
pkgs/tools/networking/network-manager/iodine/default.nix
··· 1 - { stdenv, fetchurl, iodine, intltool, pkgconfig, networkmanager, libsecret 1 + { stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret 2 2 , withGnome ? true, gnome3 }: 3 3 4 4 let 5 - pname = "NetworkManager-iodine"; 5 + pname = "NetworkManager-iodine"; 6 6 version = "1.2.0"; 7 7 in stdenv.mkDerivation rec { 8 - name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; 8 + name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; 9 9 10 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 12 sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh"; 13 13 }; 14 14 15 - buildInputs = [ iodine networkmanager libsecret ] 16 - ++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring 17 - gnome3.networkmanagerapplet ]; 15 + patches = [ 16 + (substituteAll { 17 + src = ./fix-paths.patch; 18 + inherit iodine; 19 + }) 20 + ]; 21 + 22 + buildInputs = [ iodine networkmanager ] 23 + ++ stdenv.lib.optionals withGnome [ gnome3.gtk libsecret gnome3.networkmanagerapplet ]; 18 24 19 25 nativeBuildInputs = [ intltool pkgconfig ]; 20 26 ··· 22 28 NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; 23 29 24 30 configureFlags = [ 25 - "${if withGnome then "--with-gnome" else "--without-gnome"}" 26 - "--disable-static" 31 + "--with-gnome=${if withGnome then "yes" else "no"}" 27 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 35 passthru = { 36 36 updateScript = gnome3.updateScript { 37 37 packageName = pname; ··· 39 39 }; 40 40 }; 41 41 42 - meta = { 42 + meta = with stdenv.lib; { 43 43 description = "NetworkManager's iodine plugin"; 44 44 inherit (networkmanager.meta) maintainers platforms; 45 + license = licenses.gpl2Plus; 45 46 }; 46 47 }
+11
pkgs/tools/networking/network-manager/iodine/fix-paths.patch
··· 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",