11 src = fetchFromGitHub {
15 hash = "sha256-bisLln3Y239HuJt0MkrCU+6vLLbEDxfTjEJMkcbE/wE=";
16 fetchSubmodules = true;
19 svg-flatten = stdenv.mkDerivation rec {
21 pname = "svg-flatten";
23 sourceRoot = "${src.name}/svg-flatten";
26 substituteInPlace Makefile \
27 --replace "$(INSTALL) $(BUILDDIR)/$(BINARY) $(PREFIX)/bin" \
28 "$(INSTALL) $(BUILDDIR)/$(BINARY) $(PREFIX)/bin/svg-flatten" \
34 PREFIX=$out make install
39 description = "svg-flatten SVG downconverter";
40 homepage = "https://github.com/jaseg/gerbolyze";
41 license = with licenses; [ agpl3Plus ];
42 maintainers = with maintainers; [ wulfsta ];
43 mainProgram = "svg-flatten";
44 platforms = platforms.linux;
47 in python3Packages.buildPythonApplication rec {
51 format = "setuptools";
54 python3Packages.setuptools
57 propagatedBuildInputs = [
58 python3Packages.beautifulsoup4
62 python3Packages.python-slugify
64 python3Packages.gerbonara
70 # setup.py tries to execute a call to git in a subprocess, this avoids it.
71 substituteInPlace setup.py \
72 --replace "version = get_version()," \
73 "version = '${version}'," \
75 # setup.py tries to execute a call to git in a subprocess, this avoids it.
76 substituteInPlace setup.py \
77 --replace "long_description=format_readme_for_pypi()," \
78 "long_description='\n'.join(Path('README.rst').read_text().splitlines()),"
81 pythonImportsCheck = [ "gerbolyze" ];
83 nativeCheckInputs = [ python3Packages.pytestCheckHook resvg svg-flatten ];
85 passthru.updateScript = gitUpdater {
90 description = "Directly render SVG overlays into Gerber and Excellon files";
91 homepage = "https://github.com/jaseg/gerbolyze";
92 license = with licenses; [ agpl3Plus ];
93 maintainers = with maintainers; [ wulfsta ];
94 mainProgram = "gerbolyze";
95 platforms = platforms.linux;