mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-26 06:44:06 +00:00
9f7c981bec
This includes support for KiCad 8 (see complete changelog [here](https://github.com/yaqwsx/KiKit/releases/tag/v1.5.0)), which should unblock https://github.com/NixOS/nixpkgs/pull/291134. With this upgrade, a test started failing: $ nix build .#kikit ... kikit> not ok 40 Steel stencils kikit> # (in test file /build/source/test/system/stencil.bats, line 6) kikit> # `kikit stencil create --jigsize 60 60 $RES/conn.kicad_pcb steelStencil' failed kikit> # 04:32:16: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied) kikit> # An error occurred: OpenSCAD is not available. kikit> # Did you install it? Program `openscad` has to be in PATH kikit> # No output files produced kikit> not ok 41 Steel stencils with cutout kikit> # (in test file /build/source/test/system/stencil.bats, line 10) kikit> # `kikit stencil create --jigsize 60 60 --cutout J4 $RES/conn.kicad_pcb steelStencil' failed kikit> # 04:32:17: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied) kikit> # An error occurred: OpenSCAD is not available. kikit> # Did you install it? Program `openscad` has to be in PATH kikit> # No output files produced kikit> not ok 42 Printed stencils kikit> # (in test file /build/source/test/system/stencil.bats, line 14) kikit> # `kikit stencil createprinted \' failed kikit> # 04:32:17: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied) kikit> # An error occurred: OpenSCAD is not available. kikit> # Did you install it? Program `openscad` has to be in PATH kikit> # No output files produced kikit> make: *** [Makefile:40: test-system] Error 1 kikit> /nix/store/3qnm3nwjajgqa771dmi2dnwxrw0kzq5m-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context error: builder for '/nix/store/f3klmz0qvi6yr3qfy7cww434f2z4kjx5-kikit-1.5.0.drv' failed with exit code 2; This is failing in some pretty old kikit code, so I think this is just failing due to kikit now having more complete code coverage. While researching this, I discovered kikit's documentation about [optional dependencies], which I suppose we don't have good support for right now. Rather than invent a new option for that, I've opted to preserve the existing behavior and just do the bare minimum to keep the build passing. [optional dependencies]: https://github.com/yaqwsx/KiKit/blob/v1.5.0/docs/installation/intro.md#optional-dependencies
90 lines
1.7 KiB
Nix
90 lines
1.7 KiB
Nix
{ bc
|
|
, zip
|
|
, lib
|
|
, fetchFromGitHub
|
|
, bats
|
|
, buildPythonApplication
|
|
, pythonOlder
|
|
, callPackage
|
|
, kicad
|
|
, numpy
|
|
, click
|
|
, markdown2
|
|
, openscad
|
|
, pytestCheckHook
|
|
, commentjson
|
|
, wxpython
|
|
, pcbnew-transition
|
|
, pybars3
|
|
, versioneer
|
|
, shapely_1_8
|
|
}:
|
|
let
|
|
solidpython = callPackage ./solidpython { };
|
|
in
|
|
buildPythonApplication rec {
|
|
pname = "kikit";
|
|
version = "1.5.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yaqwsx";
|
|
repo = "KiKit";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-f8FB6EEy9Ch4LcMKd9PADXV9QrSb7e22Ui86G6AnQKE=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
kicad
|
|
numpy
|
|
click
|
|
markdown2
|
|
# OpenSCAD is an optional dependency (see
|
|
# https://github.com/yaqwsx/KiKit/blob/v1.5.0/docs/installation/intro.md#optional-dependencies).
|
|
openscad
|
|
commentjson
|
|
# https://github.com/yaqwsx/KiKit/issues/575
|
|
wxpython
|
|
pcbnew-transition
|
|
pybars3
|
|
# https://github.com/yaqwsx/KiKit/issues/574
|
|
shapely_1_8
|
|
# https://github.com/yaqwsx/KiKit/issues/576
|
|
solidpython
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
versioneer
|
|
bc
|
|
zip
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
bats
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"kikit"
|
|
];
|
|
|
|
preCheck = ''
|
|
export PATH=$PATH:$out/bin
|
|
|
|
make test-system
|
|
|
|
# pytest needs to run in a subdir. See https://github.com/yaqwsx/KiKit/blob/v1.3.0/Makefile#L43
|
|
cd test/units
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Automation for KiCAD boards";
|
|
homepage = "https://github.com/yaqwsx/KiKit/";
|
|
changelog = "https://github.com/yaqwsx/KiKit/releases/tag/v${version}";
|
|
maintainers = with maintainers; [ jfly matusf ];
|
|
license = licenses.mit;
|
|
};
|
|
}
|