2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, glib, fetchFromGitHub, networkmanager, python3Packages
|
2018-12-02 12:41:15 +01:00
|
|
|
, gobject-introspection }:
|
2017-03-01 05:55:09 +01:00
|
|
|
|
|
|
|
let inherit (python3Packages) python pygobject3;
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "networkmanager_dmenu";
|
2020-08-23 10:38:02 +02:00
|
|
|
version = "1.6.0";
|
2017-03-01 05:55:09 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "firecat53";
|
|
|
|
repo = "networkmanager-dmenu";
|
2020-11-01 23:39:49 +01:00
|
|
|
rev = version;
|
2020-08-23 10:38:02 +02:00
|
|
|
sha256 = "1liidqh8c33pxyb07qyj0jkd0fdak73g9r2iwiq62vfzrpik09k0";
|
2017-03-01 05:55:09 +01:00
|
|
|
};
|
|
|
|
|
2018-12-02 12:41:15 +01:00
|
|
|
buildInputs = [ glib python pygobject3 gobject-introspection networkmanager python3Packages.wrapPython ];
|
2017-03-01 05:55:09 +01:00
|
|
|
|
2017-05-01 19:06:23 +02:00
|
|
|
dontBuild = true;
|
2017-03-01 05:55:09 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp networkmanager_dmenu $out/bin/
|
|
|
|
'';
|
|
|
|
|
2017-05-01 19:06:23 +02:00
|
|
|
postFixup = ''
|
|
|
|
makeWrapperArgs="\
|
|
|
|
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
|
|
|
|
--prefix PYTHONPATH : \"$(toPythonPath $out):$(toPythonPath ${pygobject3})\""
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-03-01 05:55:09 +01:00
|
|
|
description = "Small script to manage NetworkManager connections with dmenu instead of nm-applet";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/firecat53/networkmanager-dmenu";
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.jensbin ];
|
|
|
|
platforms = lib.platforms.all;
|
2017-03-01 05:55:09 +01:00
|
|
|
};
|
|
|
|
}
|