diff --git a/pkgs/tools/networking/networkmanager_dmenu/default.nix b/pkgs/tools/networking/networkmanager_dmenu/default.nix new file mode 100644 index 000000000000..7462a3d809c6 --- /dev/null +++ b/pkgs/tools/networking/networkmanager_dmenu/default.nix @@ -0,0 +1,35 @@ +{ stdenv, glib, fetchFromGitHub, networkmanager, python3Packages +, gobjectIntrospection, dmenu, makeWrapper }: + +let inherit (python3Packages) python pygobject3; +in stdenv.mkDerivation rec { + name = "networkmanager_dmenu-${version}"; + version = "git-20170301"; + + src = fetchFromGitHub { + owner = "firecat53"; + repo = "networkmanager-dmenu"; + rev = "f631f34645cd581eb14cb2f3286fa02dcc60283f"; + sha256 = "0f3rkyhhyy3ab0bnaasazx33b952gfl3g3b3sg8fl00n90l53d11"; + }; + + buildInputs = [ glib python pygobject3 makeWrapper gobjectIntrospection networkmanager ]; + + phases = "unpackPhase installPhase"; + + installPhase = '' + mkdir -p $out/bin + cp networkmanager_dmenu $out/bin/ + wrapProgram $out/bin/networkmanager_dmenu \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ + --prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" + ''; + + meta = with stdenv.lib; { + description = "Small script to manage NetworkManager connections with dmenu instead of nm-applet"; + homepage = https://github.com/firecat53/networkmanager-dmenu; + license = stdenv.lib.licenses.mit; + maintainers = [ ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 170fa60c27b2..ee0f34646666 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3055,6 +3055,8 @@ with pkgs; networkmanagerapplet = newScope gnome2 ../tools/networking/network-manager-applet { }; + networkmanager_dmenu = callPackage ../tools/networking/networkmanager_dmenu { }; + newsbeuter = callPackage ../applications/networking/feedreaders/newsbeuter { }; newsbeuter-dev = callPackage ../applications/networking/feedreaders/newsbeuter/dev.nix { };