about summary refs log tree commit diff
path: root/pkgs/development/python-modules/univers/default.nix
blob: 3669009d530ea14f5de9918084e166cf41ffea11 (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
47
48
49
50
{ lib
, fetchPypi
, fetchpatch
, buildPythonPackage
, setuptools-scm
, attrs
, packaging
, pyparsing
, semantic-version
, semver
, commoncode
, pytestCheckHook
, saneyaml
}:

buildPythonPackage rec {
  pname = "univers";
  version = "30.7.0";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-yM0SDBpkiZEbaZ0ugjiMwwUFKqZGbmh1JNlv5qvPAYo=";
  };

  patches = [
    # Make tests work when not using virtualenv, can be dropped with the next version
    # Upstream PR (already merged): https://github.com/nexB/univers/pull/77
    (fetchpatch {
      url = "https://github.com/nexB/univers/commit/b74229cc1c8790287633cd7220d6b2e97c508302.patch";
      hash = "sha256-i6zWv9rAlwCMghd9g5FP6WIQLLDLYvp+6qJ1E7nfTSY=";
    })
  ];

  nativeBuildInputs = [ setuptools-scm ];
  propagatedBuildInputs = [ attrs packaging pyparsing semantic-version semver ];
  nativeCheckInputs = [ commoncode pytestCheckHook saneyaml ];

  dontConfigure = true; # ./configure tries to setup virtualenv and downloads dependencies

  disabledTests = [ "test_codestyle" ];

  pythonImportsCheck = [ "univers" ];

  meta = with lib; {
    description = "Library for parsing version ranges and expressions";
    homepage = "https://github.com/nexB/univers";
    license = with licenses; [ asl20 bsd3 mit ];
    maintainers = with maintainers; [ armijnhemel sbruder ];
  };
}