From f976327c7a90a73846dba354afe6e0bafe2082c3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 May 2024 12:18:09 +0200 Subject: [PATCH 1/2] python312Packages.command-runner: refactor --- .../python-modules/command-runner/default.nix | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/command-runner/default.nix b/pkgs/development/python-modules/command-runner/default.nix index fb8fd94f8030..e5f8f0fcc8a7 100644 --- a/pkgs/development/python-modules/command-runner/default.nix +++ b/pkgs/development/python-modules/command-runner/default.nix @@ -1,17 +1,41 @@ -{ lib, buildPythonPackage, fetchPypi, psutil }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, psutil +, pytestCheckHook +, pythonOlder +, setuptools +}: buildPythonPackage rec { pname = "command-runner"; version = "1.6.0"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - pname = "command_runner"; - inherit version; - sha256 = "sha256-lzt1UhhrPqQrBKsRmPhqhtOIfFlCteQqo6sZ6rOut0A="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "netinvent"; + repo = "command_runner"; + rev = "refs/tags/v${version}"; + hash = "sha256-QzqkcF2/YExK/dz+b0Uk0Af/rAXRMuRIeEynyFgDql8="; }; - propagatedBuildInputs = [ psutil ]; + build-system = [ + setuptools + ]; + + dependencies = [ + psutil + ]; + + # Tests are execute ping + # ping: socket: Operation not permitted + doCheck = false; + + pythonImportsCheck = [ + "command_runner" + ]; meta = with lib; { homepage = "https://github.com/netinvent/command_runner"; @@ -19,6 +43,7 @@ buildPythonPackage rec { Platform agnostic command execution, timed background jobs with live stdout/stderr output capture, and UAC/sudo elevation ''; + changelog = "https://github.com/netinvent/command_runner/releases/tag/v${version}"; license = licenses.bsd3; maintainers = teams.wdz.members; }; From 926ca7b9ccd38b8cf24833da69fd50c954857af6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 May 2024 12:18:34 +0200 Subject: [PATCH 2/2] python312Packages.command-runner: format with nixfmt --- .../python-modules/command-runner/default.nix | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/command-runner/default.nix b/pkgs/development/python-modules/command-runner/default.nix index e5f8f0fcc8a7..f50e32abd5f3 100644 --- a/pkgs/development/python-modules/command-runner/default.nix +++ b/pkgs/development/python-modules/command-runner/default.nix @@ -1,10 +1,11 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, psutil -, pytestCheckHook -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + psutil, + pytestCheckHook, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -21,21 +22,15 @@ buildPythonPackage rec { hash = "sha256-QzqkcF2/YExK/dz+b0Uk0Af/rAXRMuRIeEynyFgDql8="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; - dependencies = [ - psutil - ]; + dependencies = [ psutil ]; # Tests are execute ping # ping: socket: Operation not permitted doCheck = false; - pythonImportsCheck = [ - "command_runner" - ]; + pythonImportsCheck = [ "command_runner" ]; meta = with lib; { homepage = "https://github.com/netinvent/command_runner";