Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
4.7 kB · 225 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226{ lib, buildPythonPackage, fetchFromGitHub,
cmake, ninja, # build-system hatchling, scikit-build-core, hatch-vcs, nanobind, # deps antlr4-python3-runtime, atopile-easyeda2kicad, black, case-converter, cookiecutter, dataclasses-json, deprecated, fastapi-github-oidc, freetype-py, gitpython, kicad-python, kicadcliwrapper, matplotlib, mcp, more-itertools, natsort, numpy, ordered-set, pathvalidate, pint, posthog, psutil, pydantic-settings, pygls, questionary, requests, rich, ruamel-yaml, ruff, semver, sexpdata, shapely, typer, urllib3, zstd, pythonOlder,
# tests pytestCheckHook,
pytest-benchmark, pytest-timeout, pytest-datafiles, pytest-xdist, hypothesis, writableTmpDirAsHomeHook,}:
buildPythonPackage rec { pname = "atopile"; version = "0.11.2"; pyproject = true;
disabled = pythonOlder "3.13";
src = fetchFromGitHub { owner = "atopile"; repo = "atopile"; tag = "v${version}"; hash = "sha256-JczlQulHlViV9pg0uPXd9Boagp74VBdZ1UMDXh2c3DA="; };
build-system = [ hatchling scikit-build-core hatch-vcs nanobind ];
dontUseCmakeConfigure = true; # skip cmake configure invocation
nativeBuildInputs = [ cmake ninja ];
dependencies = [ antlr4-python3-runtime atopile-easyeda2kicad black # used as a dependency case-converter cookiecutter dataclasses-json deprecated fastapi-github-oidc freetype-py gitpython kicad-python kicadcliwrapper matplotlib mcp more-itertools natsort numpy ordered-set pathvalidate pint posthog psutil pydantic-settings pygls questionary requests rich ruamel-yaml ruff semver sexpdata shapely typer urllib3 zstd ];
pythonRelaxDeps = [ "posthog" "zstd" ];
pythonImportsCheck = [ "atopile" ];
nativeCheckInputs = [ writableTmpDirAsHomeHook pytestCheckHook pytest-xdist pytest-benchmark pytest-datafiles pytest-timeout hypothesis ];
preCheck = '' # do not report worker logs to filee substituteInPlace test/conftest.py \ --replace-fail "worker_id =" "worker_id = None #"
# unrecognized flags substituteInPlace pyproject.toml \ --replace-fail "--html=artifacts/test-report.html" "" \ --replace-fail "--self-contained-html" "" \ --replace-fail "--numprocesses=auto" "" \
# Replace this function call that cause test to hang substituteInPlace \ test/cli/test_packages.py \ test/library/test_names.py \ test/test_examples.py \ test/test_parse_utils.py \ --replace-fail "_repo_root()" "Path('$(pwd)')"
# Fix crash due to empty list in fixture tests substituteInPlace \ test/test_examples.py \ test/test_parse_utils.py \ --replace-fail "p.stem" "p.stem if isinstance(p, Path) else p" '';
disabledTestPaths = [ # timouts "test/test_cli.py" "test/cli/test_packages.py" "test/end_to_end/test_net_naming.py" "test/end_to_end/test_pcb_export.py" "test/exporters/bom/test_bom.py" "test/front_end/test_front_end_pick.py" "test/libs/picker/test_pickers.py" ];
disabledTests = [ # timeout "test_build_error_logging" "test_performance_mifs_bus_params" "test_resistor" "test_reserved_attrs" # requires internet "test_simple_pick" "test_simple_negative_pick" "test_jlcpcb_pick_resistor" "test_jlcpcb_pick_capacitor" "test_regression_rp2040_usb_diffpair_full" "test_model_translations" # type error "test_alternate_trait_constructor_with_params" "test_parameterised_trait_with_params" "test_trait_alternate_constructor_precedence" "test_trait_template_enum" "test_trait_template_enum_invalid" # failure "test_solve_voltage_divider_complex" ];
# in order to use pytest marker, we need to use ppytestFlagsArray # using pytestFlags causes `ERROR: file or directory not found: slow` pytestFlagsArray = [ "-m='not slow and not not_in_ci and not regression'" "--timeout=10" # any test taking long, timouts with more than 60s "--benchmark-disable" "--tb=line" ];
doCheck = true;
meta = { description = "Design circuit boards with code"; homepage = "https://atopile.io"; downloadPage = "https://github.com/atopile/atopile"; changelog = "https://github.com/atopile/atopile/releases/tag/${src.tag}"; license = with lib.licenses; [ mit ]; maintainers = with lib.maintainers; [ sigmanificient ]; mainProgram = "ato"; };}