nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 cachetools,
5 coloredlogs,
6 fetchPypi,
7 pytz,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "locationsharinglib";
14 version = "5.0.3";
15 pyproject = true;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-ar5/gyDnby0aceqqHe8lTQaHafOub+IPKglmct4xEGM=";
20 };
21
22 postPatch = ''
23 # Tests requirements want to pull in multiple modules which we don't need
24 substituteInPlace setup.py \
25 --replace-fail "tests_require=test_requirements" "tests_require=[]"
26 cp .VERSION locationsharinglib/.VERSION
27 '';
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 coloredlogs
33 requests
34 cachetools
35 pytz
36 ];
37
38 # There are no tests
39 doCheck = false;
40
41 pythonImportsCheck = [ "locationsharinglib" ];
42
43 meta = {
44 description = "Python package to retrieve coordinates from a Google account";
45 homepage = "https://locationsharinglib.readthedocs.io/";
46 changelog = "https://github.com/costastf/locationsharinglib/blob/${version}/HISTORY.rst";
47 license = lib.licenses.mit;
48 maintainers = with lib.maintainers; [ fab ];
49 };
50}