1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pbr
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "git-url-parse";
10 version = "1.2.2";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "coala";
15 repo = "git-url-parse";
16 rev = version;
17 hash = "sha256-+0V/C3wE02ppdDGn7iqdvmgsUwTR7THUakUilvkzoYg=";
18 };
19
20 postPatch = ''
21 substituteInPlace pytest.ini \
22 --replace " --cov giturlparse --cov-report term-missing" ""
23 '';
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 = [
31 pbr
32 ];
33
34 pythonImportsCheck = [ "giturlparse" ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 meta = with lib; {
41 description = "A simple GIT URL parser";
42 homepage = "https://github.com/coala/git-url-parse";
43 changelog = "https://github.com/coala/git-url-parse/blob/${src.rev}/CHANGELOG.rst";
44 license = licenses.mit;
45 maintainers = with maintainers; [ blaggacao ];
46 };
47}
48