1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 replaceVars,
6 setuptools,
7 wheel,
8 networkmanager,
9}:
10
11buildPythonPackage rec {
12 pname = "nmcli";
13 version = "1.5.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "ushiboy";
18 repo = "nmcli";
19 tag = "v${version}";
20 hash = "sha256-1gVj4WfTx1NcoyWA9OK5EyGze9hmrXV0Mq50C1S3bfM=";
21 };
22
23 build-system = [
24 setuptools
25 wheel
26 ];
27
28 patches = [
29 (replaceVars ./nmcli-path.patch {
30 nmcli = lib.getExe' networkmanager "nmcli";
31 })
32 ];
33
34 meta = {
35 description = "Python library for interacting with NetworkManager CLI";
36 homepage = "https://github.com/ushiboy/nmcli";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [ ktechmidas ];
39 inherit (networkmanager.meta) platforms;
40 changelog = "https://github.com/ushiboy/nmcli/releases/tag/v${version}";
41 };
42}