1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pbr,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "git-url-parse";
11 version = "1.2.2";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "coala";
16 repo = "git-url-parse";
17 rev = version;
18 hash = "sha256-+0V/C3wE02ppdDGn7iqdvmgsUwTR7THUakUilvkzoYg=";
19 };
20
21 postPatch = ''
22 substituteInPlace pytest.ini \
23 --replace " --cov giturlparse --cov-report term-missing" ""
24 '';
25
26 # Manually set version because prb wants to get it from the git
27 # upstream repository (and we are installing from tarball instead)
28 env.PBR_VERSION = version;
29
30 propagatedBuildInputs = [ pbr ];
31
32 pythonImportsCheck = [ "giturlparse" ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 meta = with lib; {
37 description = "Simple GIT URL parser";
38 homepage = "https://github.com/coala/git-url-parse";
39 changelog = "https://github.com/coala/git-url-parse/blob/${src.rev}/CHANGELOG.rst";
40 license = licenses.mit;
41 maintainers = with maintainers; [ blaggacao ];
42 };
43}