nixpkgs/pkgs/tools/networking/networkmanager/dmenu/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, glib, fetchFromGitHub, networkmanager, python3Packages
, gobject-introspection }:
2017-03-01 04:55:09 +00:00
let inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
pname = "networkmanager_dmenu";
2022-01-30 02:03:46 +00:00
version = "2.1.0";
2017-03-01 04:55:09 +00:00
src = fetchFromGitHub {
owner = "firecat53";
repo = "networkmanager-dmenu";
2022-01-30 02:03:46 +00:00
rev = "v${version}";
sha256 = "sha256-btwiKxmb1xDtPSTOIvpHJDQ5SY1gnBWlKnYOzzSLDEY=";
2017-03-01 04:55:09 +00:00
};
buildInputs = [ glib python pygobject3 gobject-introspection networkmanager python3Packages.wrapPython ];
2017-03-01 04:55:09 +00:00
dontBuild = true;
2017-03-01 04:55:09 +00:00
installPhase = ''
2022-01-30 02:03:46 +00:00
mkdir -p $out/bin $out/share/applications $out/share/doc/$pname
2017-03-01 04:55:09 +00:00
cp networkmanager_dmenu $out/bin/
2022-01-30 02:03:46 +00:00
cp networkmanager_dmenu.desktop $out/share/applications
cp README.md $out/share/doc/$pname/
cp config.ini.example $out/share/doc/$pname/
2017-03-01 04:55:09 +00:00
'';
postFixup = ''
makeWrapperArgs="\
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
--prefix PYTHONPATH : \"$(toPythonPath $out):$(toPythonPath ${pygobject3})\""
wrapPythonPrograms
'';
meta = with lib; {
2017-03-01 04:55:09 +00:00
description = "Small script to manage NetworkManager connections with dmenu instead of nm-applet";
homepage = "https://github.com/firecat53/networkmanager-dmenu";
2021-01-15 09:19:50 +00:00
license = lib.licenses.mit;
maintainers = [ lib.maintainers.jensbin ];
platforms = lib.platforms.all;
2017-03-01 04:55:09 +00:00
};
}