1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools,
6 poetry-core,
7}:
8
9buildPythonPackage rec {
10 pname = "graphlib-backport";
11 version = "1.1.0";
12
13 format = "pyproject";
14
15 src = fetchFromGitHub {
16 owner = "mariushelf";
17 repo = "graphlib_backport";
18 rev = version;
19 hash = "sha256-ssJLtBQH8sSnccgcAKLKfYpPyw5U0RIm1F66/Er81lo=";
20 };
21
22 postPatch = ''
23 substituteInPlace pyproject.toml \
24 --replace 'poetry>=1.0' 'poetry-core' \
25 --replace 'poetry.masonry.api' 'poetry.core.masonry.api'
26 '';
27
28 propagatedBuildInputs = [
29 setuptools
30 poetry-core
31 ];
32
33 pythonImportsCheck = [ "graphlib" ];
34
35 meta = with lib; {
36 description = "Backport of the Python 3.9 graphlib module for Python 3.6+";
37 homepage = "https://github.com/mariushelf/graphlib_backport";
38 license = licenses.psfl;
39 maintainers = with maintainers; [ t4ccer ];
40 };
41}