aboutsummaryrefslogtreecommitdiff
path: root/clef/nix/pkgs/interactive_html_bom.nix
diff options
context:
space:
mode:
Diffstat (limited to 'clef/nix/pkgs/interactive_html_bom.nix')
-rw-r--r--clef/nix/pkgs/interactive_html_bom.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/clef/nix/pkgs/interactive_html_bom.nix b/clef/nix/pkgs/interactive_html_bom.nix
new file mode 100644
index 0000000..2ed69ed
--- /dev/null
+++ b/clef/nix/pkgs/interactive_html_bom.nix
@@ -0,0 +1,62 @@
+{
+ python3Packages,
+ writeText,
+ kicad-small,
+
+ fetchFromGitHub,
+
+ version ? "v2.9.0",
+ thisSrc ? fetchFromGitHub {
+ owner = "openscopeproject";
+ repo = "interactivehtmlbom";
+ rev = version;
+ hash = "sha256-jUHEI0dWMFPQlXei3+0m1ruHzpG1hcRnxptNOXzXDqQ=";
+ },
+
+ 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'
+ ]
+ }
+ )
+ '',
+}:
+
+let
+ src = thisSrc;
+
+in python3Packages.buildPythonApplication {
+ pname = "interactive_html_bom";
+
+ inherit
+ version
+ src
+ ;
+
+ preBuild = ''
+ cp -nv ${dummySetupPy} setup.py
+ rm pyproject.toml
+ '';
+
+ dependencies = with python3Packages; [
+ wxpython
+ jsonschema
+ kicad-small.base
+ ];
+
+ doCheck = false;
+}