networkmanager-iodine: clean up

+27 -15
+16 -15
pkgs/tools/networking/network-manager/iodine/default.nix
··· 1 - { stdenv, fetchurl, iodine, intltool, pkgconfig, networkmanager, libsecret 2 , withGnome ? true, gnome3 }: 3 4 let 5 - pname = "NetworkManager-iodine"; 6 version = "1.2.0"; 7 in stdenv.mkDerivation rec { 8 - name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; 9 10 src = fetchurl { 11 - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 12 sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh"; 13 }; 14 15 - buildInputs = [ iodine networkmanager libsecret ] 16 - ++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring 17 - gnome3.networkmanagerapplet ]; 18 19 nativeBuildInputs = [ intltool pkgconfig ]; 20 ··· 22 NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; 23 24 configureFlags = [ 25 - "${if withGnome then "--with-gnome" else "--without-gnome"}" 26 - "--disable-static" 27 "--localstatedir=/" # needed for the management socket under /run/NetworkManager 28 ]; 29 30 - preConfigure = '' 31 - substituteInPlace "src/nm-iodine-service.c" \ 32 - --replace "/usr/bin/iodine" "${iodine}/bin/iodine" 33 - ''; 34 - 35 passthru = { 36 updateScript = gnome3.updateScript { 37 packageName = pname; ··· 39 }; 40 }; 41 42 - meta = { 43 description = "NetworkManager's iodine plugin"; 44 inherit (networkmanager.meta) maintainers platforms; 45 }; 46 }
··· 1 + { stdenv, fetchurl, substituteAll, iodine, intltool, pkgconfig, networkmanager, libsecret 2 , withGnome ? true, gnome3 }: 3 4 let 5 + pname = "NetworkManager-iodine"; 6 version = "1.2.0"; 7 in stdenv.mkDerivation rec { 8 + name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; 9 10 src = fetchurl { 11 + url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 12 sha256 = "0njdigakidji6mfmbsp8lfi8wl88z1dk8cljbva2w0xazyddbwyh"; 13 }; 14 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 ]; 24 25 nativeBuildInputs = [ intltool pkgconfig ]; 26 ··· 28 NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations"; 29 30 configureFlags = [ 31 + "--with-gnome=${if withGnome then "yes" else "no"}" 32 "--localstatedir=/" # needed for the management socket under /run/NetworkManager 33 ]; 34 35 passthru = { 36 updateScript = gnome3.updateScript { 37 packageName = pname; ··· 39 }; 40 }; 41 42 + meta = with stdenv.lib; { 43 description = "NetworkManager's iodine plugin"; 44 inherit (networkmanager.meta) maintainers platforms; 45 + license = licenses.gpl2Plus; 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",