1{ lib
2, fetchPypi
3, fetchpatch
4, buildPythonPackage
5, setuptools-scm
6, attrs
7, packaging
8, pyparsing
9, semantic-version
10, semver
11, commoncode
12, pytestCheckHook
13, saneyaml
14}:
15
16buildPythonPackage rec {
17 pname = "univers";
18 version = "30.7.0";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "sha256-yM0SDBpkiZEbaZ0ugjiMwwUFKqZGbmh1JNlv5qvPAYo=";
23 };
24
25 patches = [
26 # Make tests work when not using virtualenv, can be dropped with the next version
27 # Upstream PR (already merged): https://github.com/nexB/univers/pull/77
28 (fetchpatch {
29 url = "https://github.com/nexB/univers/commit/b74229cc1c8790287633cd7220d6b2e97c508302.patch";
30 sha256 = "sha256-i6zWv9rAlwCMghd9g5FP6WIQLLDLYvp+6qJ1E7nfTSY=";
31 })
32 ];
33
34 nativeBuildInputs = [ setuptools-scm ];
35 propagatedBuildInputs = [ attrs packaging pyparsing semantic-version semver ];
36 checkInputs = [ commoncode pytestCheckHook saneyaml ];
37
38 dontConfigure = true; # ./configure tries to setup virtualenv and downloads dependencies
39
40 disabledTests = [ "test_codestyle" ];
41
42 pythonImportsCheck = [ "univers" ];
43
44 meta = with lib; {
45 description = "Library for parsing version ranges and expressions";
46 homepage = "https://github.com/nexB/univers";
47 license = with licenses; [ asl20 bsd3 mit ];
48 maintainers = with maintainers; [ armijnhemel sbruder ];
49 };
50}