Skip to content

Commit

Permalink
Merge pull request NixOS#313582 from fabaff/crc16-refactor
Browse files Browse the repository at this point in the history
python312Packages.crc16: refactor, python312Packages.pyoppleio: refactor
  • Loading branch information
fabaff authored May 22, 2024
2 parents eebc764 + e3210f0 commit a2ab4d5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
25 changes: 20 additions & 5 deletions pkgs/development/python-modules/crc16/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
{ 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 ];
};
}
28 changes: 14 additions & 14 deletions pkgs/development/python-modules/pyoppleio/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{ lib
, buildPythonPackage
, crc16
, fetchPypi
, pythonOlder
{
lib,
buildPythonPackage,
crc16,
fetchPypi,
pythonOlder,
setuptools,
}:

buildPythonPackage rec {
pname = "pyoppleio";
version = "1.0.7";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";

Expand All @@ -17,22 +19,20 @@ buildPythonPackage rec {
hash = "sha256-S1w3pPqhX903kkXUq9ALz0+zRvNGOimLughRRVKjV8E=";
};

propagatedBuildInputs = [
crc16
];
build-system = [ setuptools ];

dependencies = [ crc16 ];

# Module has no tests
doCheck = false;

pythonImportsCheck = [
"pyoppleio"
];
pythonImportsCheck = [ "pyoppleio" ];

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";
};
}

0 comments on commit a2ab4d5

Please sign in to comment.