2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, glib, fetchFromGitHub, networkmanager, python3Packages
|
2023-09-06 09:19:29 +00:00
|
|
|
, gobject-introspection, procps }:
|
2017-03-01 04:55:09 +00:00
|
|
|
|
|
|
|
let inherit (python3Packages) python pygobject3;
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2023-06-22 11:49:31 +00:00
|
|
|
nativeBuildInputs = [ gobject-introspection ];
|
2023-09-06 09:19:29 +00:00
|
|
|
buildInputs = [ glib python pygobject3 networkmanager python3Packages.wrapPython procps ];
|
2017-03-01 04:55:09 +00:00
|
|
|
|
2017-05-01 17:06:23 +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
|
|
|
'';
|
|
|
|
|
2017-05-01 17:06:23 +00:00
|
|
|
postFixup = ''
|
|
|
|
makeWrapperArgs="\
|
|
|
|
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
|
|
|
|
--prefix PYTHONPATH : \"$(toPythonPath $out):$(toPythonPath ${pygobject3})\""
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-03-01 04:55:09 +00:00
|
|
|
description = "Small script to manage NetworkManager connections with dmenu instead of nm-applet";
|
2020-04-01 01:11:51 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|