summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/flit-scm/default.nix
blob: 60eb80034910606679d9f91bc2098b0883bde9d4 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitLab,
  pythonOlder,
  flit-core,
  setuptools-scm,
  tomli,
}:

buildPythonPackage rec {
  pname = "flit-scm";
  version = "1.7.0";
  pyproject = true;

  src = fetchFromGitLab {
    owner = "WillDaSilva";
    repo = "flit_scm";
    tag = version;
    hash = "sha256-2nx9kWq/2TzauOW+c67g9a3JZ2dhBM4QzKyK/sqWOPo=";
  };

  nativeBuildInputs = [
    flit-core
    setuptools-scm
  ]
  ++ lib.optionals (pythonOlder "3.11") [ tomli ];

  propagatedBuildInputs = [
    flit-core
    setuptools-scm
  ]
  ++ lib.optionals (pythonOlder "3.11") [ tomli ];

  pythonImportsCheck = [ "flit_scm" ];

  doCheck = false; # no tests

  meta = {
    description = "PEP 518 build backend that uses setuptools_scm to generate a version file from your version control system, then flit to build the package";
    homepage = "https://gitlab.com/WillDaSilva/flit_scm";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ cpcloud ];
  };
}