about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/nipreps-versions/default.nix
blob: 1c54ab9d905e4f3a54bab9e2ce7abead9f70ba6f (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, flit-scm
, packaging
, setuptools-scm
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "nipreps-versions";
  version = "1.0.4";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "nipreps";
    repo = "version-schemes";
    rev = "refs/tags/${version}";
    hash = "sha256-B2wtLurzgk59kTooH51a2dewK7aEyA0dAm64Wp+tqhM=";
  };

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    flit-scm
    setuptools-scm
  ];

  propagatedBuildInputs = [
    packaging
  ];

  nativeCheckInputs = [ pytestCheckHook ];
  pythonImportsCheck = [ "nipreps_versions" ];

  meta = with lib; {
    description = "Setuptools_scm plugin for nipreps version schemes";
    homepage = "https://github.com/nipreps/version-schemes";
    changelog = "https://github.com/nipreps/version-schemes/blob/${src.rev}/CHANGES.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ bcdarwin ];
  };
}