Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 49 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, black 6, jinja2 7, poetry-core 8, round 9, graphviz 10, inkscape 11, imagemagick 12, pytestCheckHook 13}: 14 15buildPythonPackage rec { 16 pname = "diagrams"; 17 version = "0.19.1"; 18 format = "pyproject"; 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "mingrammer"; 23 repo = pname; 24 rev = "v${version}"; 25 sha256 = "0qvk0cp3026n5jmwp9z7m70b6pws0h6a7slxr23glg18baxr44d4"; 26 }; 27 28 preConfigure = '' 29 patchShebangs autogen.sh 30 ./autogen.sh 31 ''; 32 33 patches = [ ./build_poetry.patch ]; 34 35 checkInputs = [ pytestCheckHook ]; 36 37 # Despite living in 'tool.poetry.dependencies', 38 # these are only used at build time to process the image resource files 39 nativeBuildInputs = [ black inkscape imagemagick jinja2 poetry-core round ]; 40 41 propagatedBuildInputs = [ graphviz ]; 42 43 meta = with lib; { 44 description = "Diagram as Code"; 45 homepage = "https://diagrams.mingrammer.com/"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ addict3d ]; 48 }; 49}