From 49e67fc13b95a1afb3189864556c151e27800cfa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 08:39:12 +0200 Subject: [PATCH 1/4] python312Packages.crc16: refactor --- .../python-modules/crc16/default.nix | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/crc16/default.nix b/pkgs/development/python-modules/crc16/default.nix index eda1987a5b076..059bc0b438e31 100644 --- a/pkgs/development/python-modules/crc16/default.nix +++ b/pkgs/development/python-modules/crc16/default.nix @@ -1,19 +1,37 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, pythonOlder +}: buildPythonPackage rec { pname = "crc16"; version = "0.1.1"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "15nkx0pa4lskwin84flpk8fsw3jqg6wic6v3s83syjqg76h6my61"; + hash = "sha256-wfhqoDkPS68H0mMbFrl5WA6uHZqXOoJs5FNToi7o05Y="; }; + build-system = [ + setuptools + ]; + + # Tests are outdated + doCheck = false; + + pythonImportsCheck = [ + "crc16" + ]; + meta = with lib; { - homepage = "https://code.google.com/archive/p/pycrc16/"; description = "Python library for calculating CRC16"; - license = licenses.lgpl3; + homepage = "https://code.google.com/archive/p/pycrc16/"; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ abbradar ]; }; } From 06beba13000efdbae85d9782fd6231317643ac84 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 08:39:33 +0200 Subject: [PATCH 2/4] python312Packages.crc16: format with nixfmt --- .../python-modules/crc16/default.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/crc16/default.nix b/pkgs/development/python-modules/crc16/default.nix index 059bc0b438e31..6ef211c06fba1 100644 --- a/pkgs/development/python-modules/crc16/default.nix +++ b/pkgs/development/python-modules/crc16/default.nix @@ -1,8 +1,9 @@ -{ lib -, buildPythonPackage -, fetchPypi -, setuptools -, pythonOlder +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + pythonOlder, }: buildPythonPackage rec { @@ -17,16 +18,12 @@ buildPythonPackage rec { hash = "sha256-wfhqoDkPS68H0mMbFrl5WA6uHZqXOoJs5FNToi7o05Y="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; # Tests are outdated doCheck = false; - pythonImportsCheck = [ - "crc16" - ]; + pythonImportsCheck = [ "crc16" ]; meta = with lib; { description = "Python library for calculating CRC16"; From 665ff2481c48aa3902c3b342aaa83257d3dbe0d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 08:41:48 +0200 Subject: [PATCH 3/4] python312Packages.pyoppleio: refactor --- .../python-modules/pyoppleio/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyoppleio/default.nix b/pkgs/development/python-modules/pyoppleio/default.nix index 4487647ca81d8..485d95d52d153 100644 --- a/pkgs/development/python-modules/pyoppleio/default.nix +++ b/pkgs/development/python-modules/pyoppleio/default.nix @@ -3,12 +3,13 @@ , crc16 , fetchPypi , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "pyoppleio"; version = "1.0.7"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -17,7 +18,11 @@ buildPythonPackage rec { hash = "sha256-S1w3pPqhX903kkXUq9ALz0+zRvNGOimLughRRVKjV8E="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ crc16 ]; @@ -30,9 +35,9 @@ buildPythonPackage rec { meta = with lib; { description = "Library for interacting with OPPLE lights"; - mainProgram = "oppleio"; homepage = "https://github.com/jedmeng/python-oppleio"; - license = with licenses; [ asl20 ]; + license = licenses.asl20; maintainers = with maintainers; [ fab ]; + mainProgram = "oppleio"; }; } From e3210f0388727cf8b523321737e5429c5840708f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 08:42:01 +0200 Subject: [PATCH 4/4] python312Packages.pyoppleio: format with nixfmt --- .../python-modules/pyoppleio/default.nix | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/pyoppleio/default.nix b/pkgs/development/python-modules/pyoppleio/default.nix index 485d95d52d153..b9ef0e23a73f3 100644 --- a/pkgs/development/python-modules/pyoppleio/default.nix +++ b/pkgs/development/python-modules/pyoppleio/default.nix @@ -1,9 +1,10 @@ -{ lib -, buildPythonPackage -, crc16 -, fetchPypi -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + crc16, + fetchPypi, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -18,20 +19,14 @@ buildPythonPackage rec { hash = "sha256-S1w3pPqhX903kkXUq9ALz0+zRvNGOimLughRRVKjV8E="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; - dependencies = [ - crc16 - ]; + dependencies = [ crc16 ]; # Module has no tests doCheck = false; - pythonImportsCheck = [ - "pyoppleio" - ]; + pythonImportsCheck = [ "pyoppleio" ]; meta = with lib; { description = "Library for interacting with OPPLE lights";