nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchFromGitHub,
3 lib,
4 kicad,
5 python3Packages,
6 xvfb-run,
7}:
8
9python3Packages.buildPythonApplication rec {
10 pname = "interactive-html-bom";
11 version = "2.10.0";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "openscopeproject";
16 repo = "InteractiveHtmlBom";
17 tag = "v${version}";
18 hash = "sha256-o7GWdAFFK3zK0fc7aTSwOsd/c4uPg3cJfR0SXbl2RW8=";
19 };
20
21 build-system = [ python3Packages.hatchling ];
22
23 dependencies = [
24 python3Packages.jsonschema
25 python3Packages.wxpython
26 python3Packages.kicad
27 ];
28
29 nativeCheckInputs = [
30 xvfb-run
31 ];
32
33 checkPhase = ''
34 runHook preCheck
35
36 cp ${kicad.base}/share/kicad/demos/stickhub/StickHub.kicad_pcb .
37 HOME=$(mktemp -d) xvfb-run $out/bin/generate_interactive_bom --no-browser StickHub.kicad_pcb
38
39 runHook postCheck
40 '';
41
42 meta = {
43 description = "Interactive HTML BOM generation for KiCad, EasyEDA, Eagle, Fusion360 and Allegro PCB designer";
44 homepage = "https://github.com/openscopeproject/InteractiveHtmlBom/";
45 license = lib.licenses.mit;
46 changelog = "https://github.com/openscopeproject/InteractiveHtmlBom/releases/tag/${src.tag}";
47 maintainers = with lib.maintainers; [ wuyoli ];
48 mainProgram = "generate_interactive_bom";
49 };
50}