Commit e91003d5 authored by ktechmidas's avatar ktechmidas
Browse files

python3Packages.nmcli: init at 1.5.0

parent e597e50a
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  replaceVars,
  setuptools,
  wheel,
  networkmanager,
}:

buildPythonPackage rec {
  pname = "nmcli";
  version = "1.5.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ushiboy";
    repo = "nmcli";
    tag = "v${version}";
    hash = "sha256-1gVj4WfTx1NcoyWA9OK5EyGze9hmrXV0Mq50C1S3bfM=";
  };

  build-system = [
    setuptools
    wheel
  ];

  patches = [
    (replaceVars ./nmcli-path.patch {
      nmcli = lib.getExe' networkmanager "nmcli";
    })
  ];

  meta = {
    description = "Python library for interacting with NetworkManager CLI";
    homepage = "https://github.com/ushiboy/nmcli";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ktechmidas ];
    inherit (networkmanager.meta) platforms;
    changelog = "https://github.com/ushiboy/nmcli/releases/tag/v${version}";
  };
}
+11 −0
Original line number Diff line number Diff line
--- a/nmcli/_system.py
+++ b/nmcli/_system.py
@@ -43,7 +43,7 @@ class System:
     def nmcli(self, parameters: CommandParameter) -> str:
         if isinstance(parameters, str):
             parameters = [parameters]
-        c = ['sudo', 'nmcli'] if self._use_sudo else ['nmcli']
+        c = ['sudo', '@nmcli@'] if self._use_sudo else ['@nmcli@']
         commands = c + parameters
         try:
             env = dict(os.environ, **{'LANG': self._lang})
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -10461,6 +10461,8 @@ self: super: with self; {
  nmapthon2 = callPackage ../development/python-modules/nmapthon2 { };
  nmcli = callPackage ../development/python-modules/nmcli { };
  nnpdf = toPythonModule (pkgs.nnpdf.override { python3 = python; });
  noaa-coops = callPackage ../development/python-modules/noaa-coops { };