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.

45 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, glib, fetchFromGitHub, networkmanager, python3Packages
, gobject-introspection, procps }:
2017-03-01 04:55:09 +00:00
let inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
pname = "networkmanager_dmenu";
2023-08-28 00:36:31 +00:00
version = "2.3.1";
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}";
2023-08-28 00:36:31 +00:00
sha256 = "sha256-RbJE6JCElctBY5HDJa6SIJhm8g9BugncLF5kmambPPc=";
2017-03-01 04:55:09 +00:00
};
nativeBuildInputs = [ gobject-introspection ];
buildInputs = [ glib python pygobject3 networkmanager python3Packages.wrapPython procps ];
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
};
}