blob: 78a0414807e242e18eafcaca0e2b9624cbeda8b1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ lib, stdenv, glib, fetchFromGitHub, networkmanager, python3Packages
, gobject-introspection, procps }:
let inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
pname = "networkmanager_dmenu";
version = "2.4.0";
src = fetchFromGitHub {
owner = "firecat53";
repo = "networkmanager-dmenu";
rev = "v${version}";
sha256 = "sha256-ibZgXpHC3ueshN1BQkAaN/tW3+qulyufI3VOnxPwi7Q=";
};
nativeBuildInputs = [ gobject-introspection ];
buildInputs = [ glib python pygobject3 networkmanager python3Packages.wrapPython procps ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin $out/share/applications $out/share/doc/$pname
cp networkmanager_dmenu $out/bin/
cp networkmanager_dmenu.desktop $out/share/applications
cp README.md $out/share/doc/$pname/
cp config.ini.example $out/share/doc/$pname/
'';
postFixup = ''
makeWrapperArgs="\
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
--prefix PYTHONPATH : \"$(toPythonPath $out):$(toPythonPath ${pygobject3})\""
wrapPythonPrograms
'';
meta = with lib; {
description = "Small script to manage NetworkManager connections with dmenu instead of nm-applet";
mainProgram = "networkmanager_dmenu";
homepage = "https://github.com/firecat53/networkmanager-dmenu";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.jensbin ];
platforms = lib.platforms.all;
};
}
|