Merge pull request #102060 from addict3d/add-python-diagrams-from-github

authored by

Sandro and committed by
GitHub
15c6e717 04224b7b

+98
+6
maintainers/maintainer-list.nix
··· 224 githubId = 1773511; 225 name = "Adrien Devresse"; 226 }; 227 adisbladis = { 228 email = "adisbladis@gmail.com"; 229 github = "adisbladis";
··· 224 githubId = 1773511; 225 name = "Adrien Devresse"; 226 }; 227 + addict3d = { 228 + email = "nickbathum@gmail.com"; 229 + github = "addict3d"; 230 + githubId = 49227; 231 + name = "Nick Bathum"; 232 + }; 233 adisbladis = { 234 email = "adisbladis@gmail.com"; 235 github = "adisbladis";
+27
pkgs/applications/graphics/round/default.nix
···
··· 1 + { lib 2 + , buildGoModule 3 + , fetchFromGitHub 4 + }: 5 + 6 + buildGoModule rec { 7 + pname = "round"; 8 + version = "0.0.2"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "mingrammer"; 12 + repo = pname; 13 + rev = "v${version}"; 14 + sha256 = "09brjr3h4qnhlidxlki1by5anahxy16ai078zm4k7ryl579amzdw"; 15 + }; 16 + 17 + vendorSha256 = null; 18 + 19 + subPackages = [ "." ]; 20 + 21 + meta = with lib; { 22 + description = "Round image corners from CLI"; 23 + homepage = "https://github.com/mingrammer/round"; 24 + license = licenses.mit; 25 + maintainers = with maintainers; [ addict3d ]; 26 + }; 27 + }
+12
pkgs/development/python-modules/diagrams/build_poetry.patch
···
··· 1 + diff --git a/pyproject.toml b/pyproject.toml 2 + index 2c93a39..6c800e2 100644 3 + --- a/pyproject.toml 4 + +++ b/pyproject.toml 5 + @@ -24,3 +24,7 @@ isort = "^4.3" 6 + 7 + [tool.black] 8 + line-length = 120 9 + + 10 + +[build-system] 11 + +requires = ["poetry_core>=1.0.0"] 12 + +build-backend = "poetry.core.masonry.api"
+49
pkgs/development/python-modules/diagrams/default.nix
···
··· 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 + 15 + buildPythonPackage 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 + }
+2
pkgs/top-level/all-packages.nix
··· 17155 17156 rote = callPackage ../development/libraries/rote { }; 17157 17158 ronn = callPackage ../development/tools/ronn { }; 17159 17160 rshell = python3.pkgs.callPackage ../development/tools/rshell { };
··· 17155 17156 rote = callPackage ../development/libraries/rote { }; 17157 17158 + round = callPackage ../applications/graphics/round { }; 17159 + 17160 ronn = callPackage ../development/tools/ronn { }; 17161 17162 rshell = python3.pkgs.callPackage ../development/tools/rshell { };
+2
pkgs/top-level/python-packages.nix
··· 1817 1818 dftfit = callPackage ../development/python-modules/dftfit { }; 1819 1820 diceware = callPackage ../development/python-modules/diceware { }; 1821 1822 dicom2nifti = callPackage ../development/python-modules/dicom2nifti { };
··· 1817 1818 dftfit = callPackage ../development/python-modules/dftfit { }; 1819 1820 + diagrams = callPackage ../development/python-modules/diagrams { }; 1821 + 1822 diceware = callPackage ../development/python-modules/diceware { }; 1823 1824 dicom2nifti = callPackage ../development/python-modules/dicom2nifti { };