1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, requests
7}:
8
9buildPythonPackage rec {
10 pname = "awesomeversion";
11 version = "21.10.1";
12 disabled = pythonOlder "3.8";
13
14 src = fetchFromGitHub {
15 owner = "ludeeus";
16 repo = pname;
17 rev = version;
18 sha256 = "sha256-y+QU8T1Cb6FpRcRqhao4KPdE9XlU5C+GURaEuahC25E=";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py --replace "main" ${version}
23 '';
24
25 propagatedBuildInputs = [ requests ];
26
27 checkInputs = [
28 pytestCheckHook
29 ];
30
31 pythonImportsCheck = [ "awesomeversion" ];
32
33 meta = with lib; {
34 description = "Python module to deal with versions";
35 homepage = "https://github.com/ludeeus/awesomeversion";
36 license = with licenses; [ mit ];
37 maintainers = with maintainers; [ fab ];
38 };
39}