nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitLab,
5 pythonOlder,
6 flit-core,
7 setuptools-scm,
8 tomli,
9}:
10
11buildPythonPackage rec {
12 pname = "flit-scm";
13 version = "1.7.0";
14 pyproject = true;
15
16 src = fetchFromGitLab {
17 owner = "WillDaSilva";
18 repo = "flit_scm";
19 tag = version;
20 hash = "sha256-2nx9kWq/2TzauOW+c67g9a3JZ2dhBM4QzKyK/sqWOPo=";
21 };
22
23 nativeBuildInputs = [
24 flit-core
25 setuptools-scm
26 ]
27 ++ lib.optionals (pythonOlder "3.11") [ tomli ];
28
29 propagatedBuildInputs = [
30 flit-core
31 setuptools-scm
32 ]
33 ++ lib.optionals (pythonOlder "3.11") [ tomli ];
34
35 pythonImportsCheck = [ "flit_scm" ];
36
37 doCheck = false; # no tests
38
39 meta = {
40 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";
41 homepage = "https://gitlab.com/WillDaSilva/flit_scm";
42 license = lib.licenses.mit;
43 maintainers = with lib.maintainers; [ cpcloud ];
44 };
45}