Skip to content

Commit 37acb94

Browse files
interactive-html-bom: fix kicad dependency and add test (#388321)
2 parents 49914bd + 72f7d51 commit 37acb94

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

pkgs/by-name/in/interactive-html-bom/package.nix

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
fetchFromGitHub,
3-
kicad-small,
43
lib,
4+
kicad,
55
python3Packages,
6+
xvfb-run,
67
}:
78

89
python3Packages.buildPythonApplication rec {
@@ -22,11 +23,21 @@ python3Packages.buildPythonApplication rec {
2223
dependencies = [
2324
python3Packages.jsonschema
2425
python3Packages.wxpython
25-
kicad-small
26+
python3Packages.kicad
2627
];
2728

28-
# has no tests
29-
doCheck = false;
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+
'';
3041

3142
meta = {
3243
description = "Interactive HTML BOM generation for KiCad, EasyEDA, Eagle, Fusion360 and Allegro PCB designer";

0 commit comments

Comments
 (0)