summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/single-source/default.nix
blob: 3bf2ff810d5073c41fce4f0af56315167717b1da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, poetry-core
, pytest-mock
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "single-source";
  version = "0.3.0";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "rabbit72";
    repo = "single-source";
    rev = "refs/tags/v${version}";
    hash = "sha256-bhfMRIeJUd5JhN2tPww7fdbmHQ7ypcsZrYSa55v0+W8=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    importlib-metadata
  ];

  nativeCheckInputs = [
    pytest-mock
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "single_source"
  ];

  meta = with lib; {
    description = "Access to the project version in Python code for PEP 621-style projects";
    homepage = "https://github.com/rabbit72/single-source";
    changelog = "https://github.com/rabbit72/single-source/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}