depot/third_party/nixpkgs/pkgs/development/python-modules/smbus2/default.nix
Default email 556d6f0562 Project import generated by Copybara.
GitOrigin-RevId: e4ef597edfd8a0ba5f12362932fc9b1dd01a0aef
2021-10-11 18:52:03 +02:00

41 lines
714 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, nose
, pythonOlder
}:
buildPythonPackage rec {
pname = "smbus2";
version = "0.4.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "kplindegaard";
repo = pname;
rev = version;
sha256 = "0xgqs7bzhr8y3irc9gq3dnw1l3f5gc1yv4r2v4qxj95i3vvzpg5s";
};
checkInputs = [
nose
];
checkPhase = ''
runHook preCheck
nosetests
runHook postCheck
'';
pythonImportsCheck = [
"smbus2"
];
meta = with lib; {
description = "Drop-in replacement for smbus-cffi/smbus-python";
homepage = "https://smbus2.readthedocs.io/";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}