1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, poetry-core
7}:
8
9buildPythonPackage rec {
10 pname = "pathable";
11 version = "0.4.3";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "p1c2u";
18 repo = pname;
19 rev = "refs/tags/${version}";
20 hash = "sha256-4QRFjbeaggoEPVGAmSY+qVMNW0DKqarNfRXaH6B58ew=";
21 };
22
23 nativeBuildInputs = [
24 poetry-core
25 ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 ];
30
31 postPatch = ''
32 sed -i "/--cov/d" pyproject.toml
33 '';
34
35 pythonImportsCheck = [
36 "pathable"
37 ];
38
39 meta = with lib; {
40 description = "Library for object-oriented paths";
41 homepage = "https://github.com/p1c2u/pathable";
42 changelog = "https://github.com/p1c2u/pathable/releases/tag/${version}";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ fab ];
45 };
46}