ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / ki / kikit / default.nix
blob49bef476bccd3015ac81a771e905838b64a0ad30
1 { bc
2 , zip
3 , lib
4 , fetchFromGitHub
5 , bats
6 , buildPythonApplication
7 , pythonOlder
8 , callPackage
9 , kicad
10 , numpy
11 , click
12 , markdown2
13 , openscad
14 , pytestCheckHook
15 , commentjson
16 , wxpython
17 , pcbnewtransition
18 , pybars3
19 , versioneer
20 , shapely
22 let
23   solidpython = callPackage ./solidpython { };
25 buildPythonApplication rec {
26   pname = "kikit";
27   version = "1.6.0";
28   format = "setuptools";
30   disabled = pythonOlder "3.7";
32   src = fetchFromGitHub {
33     owner = "yaqwsx";
34     repo = "KiKit";
35     rev = "refs/tags/v${version}";
36     hash = "sha256-r8LQcy3I6hmcrU/6HfPAYJd+cEZdhad6DUldC9HvXZU=";
37   };
39   propagatedBuildInputs = [
40     kicad
41     numpy
42     click
43     markdown2
44     # OpenSCAD is an optional dependency (see
45     # https://github.com/yaqwsx/KiKit/blob/v1.5.0/docs/installation/intro.md#optional-dependencies).
46     openscad
47     commentjson
48     # https://github.com/yaqwsx/KiKit/issues/575
49     wxpython
50     pcbnewtransition
51     pybars3
52     shapely
53     # https://github.com/yaqwsx/KiKit/issues/576
54     solidpython
55   ];
57   nativeBuildInputs = [
58     versioneer
59     bc
60     zip
61   ];
63   nativeCheckInputs = [
64     pytestCheckHook
65     bats
66   ];
68   pythonImportsCheck = [
69     "kikit"
70   ];
72   preCheck = ''
73     export PATH=$PATH:$out/bin
75     make test-system
77     # pytest needs to run in a subdir. See https://github.com/yaqwsx/KiKit/blob/v1.3.0/Makefile#L43
78     cd test/units
79   '';
81   meta = with lib; {
82     description = "Automation for KiCAD boards";
83     homepage = "https://github.com/yaqwsx/KiKit/";
84     changelog = "https://github.com/yaqwsx/KiKit/releases/tag/v${version}";
85     maintainers = with maintainers; [ jfly matusf ];
86     license = licenses.mit;
87   };