2017-03-01 04:55:09 +00:00
|
|
|
{ stdenv, glib, fetchFromGitHub, networkmanager, python3Packages
|
2018-12-02 11:41:15 +00:00
|
|
|
, gobject-introspection }:
|
2017-03-01 04:55:09 +00:00
|
|
|
|
|
|
|
let inherit (python3Packages) python pygobject3;
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "networkmanager_dmenu";
|
2017-08-10 07:38:52 +01:00
|
|
|
version = "1.1";
|
2017-03-01 04:55:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "firecat53";
|
|
|
|
repo = "networkmanager-dmenu";
|
2017-08-10 07:38:52 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1z6151z7c4jv5k2i50zr7ld4k3m07dgpmss9f3hsav95cv55dcnb";
|
2017-03-01 04:55:09 +00:00
|
|
|
};
|
|
|
|
|
2018-12-02 11:41:15 +00:00
|
|
|
buildInputs = [ glib python pygobject3 gobject-introspection networkmanager python3Packages.wrapPython ];
|
2017-03-01 04:55:09 +00:00
|
|
|
|
2017-05-01 18:06:23 +01:00
|
|
|
dontBuild = true;
|
2017-03-01 04:55:09 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp networkmanager_dmenu $out/bin/
|
|
|
|
'';
|
|
|
|
|
2017-05-01 18:06:23 +01:00
|
|
|
postFixup = ''
|
|
|
|
makeWrapperArgs="\
|
|
|
|
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
|
|
|
|
--prefix PYTHONPATH : \"$(toPythonPath $out):$(toPythonPath ${pygobject3})\""
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2017-03-01 04:55:09 +00:00
|
|
|
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;
|
2017-05-01 18:06:23 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.jensbin ];
|
2017-03-01 04:55:09 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|