diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-09-02 19:53:43 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-09-02 19:53:43 -0400 |
| commit | 982798292719a24bcbb4f9e17cd5c65c8a46ecda (patch) | |
| tree | 11800fcb5a70f21903aeebed407473420bbe0d41 /hw/clef/nix/pkgs/interactive_html_bom.nix | |
| parent | 5ddfa32166cee8b2f91f37f9037eb26c182c2125 (diff) | |
move hw into subdirectory
Diffstat (limited to 'hw/clef/nix/pkgs/interactive_html_bom.nix')
| -rw-r--r-- | hw/clef/nix/pkgs/interactive_html_bom.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/hw/clef/nix/pkgs/interactive_html_bom.nix b/hw/clef/nix/pkgs/interactive_html_bom.nix new file mode 100644 index 0000000..8adf7a7 --- /dev/null +++ b/hw/clef/nix/pkgs/interactive_html_bom.nix @@ -0,0 +1,69 @@ +{ + python3Packages, + writeText, + kicad-small, + + fetchFromGitHub, + + version ? "v2.9.0", + thisSrc ? fetchFromGitHub { + owner = "openscopeproject"; + repo = "interactivehtmlbom"; + rev = version; + hash = "sha256-jUHEI0dWMFPQlXei3+0m1ruHzpG1hcRnxptNOXzXDqQ="; + }, +}: + +let + src = thisSrc; + dummySetupPy = writeText "setup.py" '' + #!/usr/bin/env python3 + # vim: set ft=python : + + from setuptools import setup, find_packages + import sys + + packages = find_packages(include=['InteractiveHtmlBom', 'InteractiveHtmlBom.*']) + + setup( + name="InteractiveHtmlBom", + version='${version}', + packages=packages, + install_requires=['wxpython>=4.0', 'jsonschema>=4.1'], + entry_points={ + 'console_scripts': [ + 'generate_interactive_bom=InteractiveHtmlBom.generate_interactive_bom:main' + ] + }, + include_package_data=True + ) + ''; + + dummyManifest = writeText "MANIFEST.in" '' + recursive-include InteractiveHtmlBom/schema * + recursive-include InteractiveHtmlBom/web * + recursive-include InteractiveHtmlBom/dialog/bitmaps * + ''; + +in python3Packages.buildPythonApplication { + pname = "interactive_html_bom"; + + inherit + version + src + ; + + preBuild = '' + cp -nv ${dummySetupPy} setup.py + cp -nv ${dummyManifest} MANIFEST.in + rm pyproject.toml + ''; + + dependencies = with python3Packages; [ + wxpython + jsonschema + kicad-small.base + ]; + + doCheck = false; +} |
