567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
54 lines
992 B
Nix
54 lines
992 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
freezegun,
|
|
mock,
|
|
pytestCheckHook,
|
|
python-dateutil,
|
|
pythonOlder,
|
|
requests-mock,
|
|
requests-oauthlib,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "fitbit";
|
|
version = "0.3.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "orcasgit";
|
|
repo = "python-fitbit";
|
|
rev = version;
|
|
hash = "sha256-1u3h47lRBrJ7EUWBl5+RLGW4KHHqXqqrXbboZdy7VPA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace fitbit_tests/test_api.py \
|
|
--replace-fail assertRaisesRegexp assertRaisesRegex
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
python-dateutil
|
|
requests-oauthlib
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
mock
|
|
pytestCheckHook
|
|
requests-mock
|
|
];
|
|
|
|
pythonImportsCheck = [ "fitbit" ];
|
|
|
|
meta = {
|
|
description = "Fitbit API Python Client Implementation";
|
|
homepage = "https://github.com/orcasgit/python-fitbit";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|