nixpkgs/pkgs/development/embedded/platformio/core.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

152 lines
4.9 KiB
Nix
Raw Normal View History

{ stdenv, lib, python3
, fetchFromGitHub
2021-08-27 20:39:43 +01:00
, fetchPypi
2021-03-18 09:47:35 +00:00
, git
, spdx-license-list-data
, version, src
}:
2022-07-17 17:55:46 +01:00
with python3.pkgs; buildPythonApplication rec {
pname = "platformio";
inherit version src;
2022-07-17 17:55:46 +01:00
patches = [
./fix-searchpath.patch
./use-local-spdx-license-list.patch
./missing-udev-rules-nixos.patch
];
postPatch = ''
substitute platformio/package/manifest/schema.py platformio/package/manifest/schema.py \
--subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data.json}'
substituteInPlace setup.py \
--replace 'uvicorn==%s" % ("0.17.*"' 'uvicorn==%s" % ("0.18.*"'
'';
propagatedBuildInputs = [
2021-10-18 14:57:26 +01:00
aiofiles
ajsonrpc
bottle
click
click-completion
colorama
git
lockfile
marshmallow
pyelftools
pyserial
requests
semantic-version
spdx-license-list-data.json
starlette
tabulate
uvicorn
wsproto
zeroconf
];
2022-07-17 17:55:46 +01:00
preCheck = ''
export HOME=$(mktemp -d)
export PATH=$PATH:$out/bin
'';
checkInputs = [
jsondiff
pytestCheckHook
];
2022-07-17 17:55:46 +01:00
disabledTestPaths = [
"tests/commands/pkg/test_install.py"
"tests/commands/pkg/test_list.py"
"tests/commands/pkg/test_outdated.py"
"tests/commands/pkg/test_search.py"
"tests/commands/pkg/test_show.py"
"tests/commands/pkg/test_uninstall.py"
"tests/commands/pkg/test_update.py"
"tests/commands/test_boards.py"
"tests/commands/test_check.py"
"tests/commands/test_platform.py"
"tests/commands/test_run.py"
"tests/commands/test_test.py"
"tests/misc/test_maintenance.py"
# requires internet connection
"tests/misc/ino2cpp/test_ino2cpp.py"
];
disabledTests = [
# requires internet connection
"test_api_cache"
"test_ping_internet_ips"
];
pytestFlagsArray = [
"tests"
] ++ (map (e: "--deselect tests/${e}") [
"commands/pkg/test_exec.py::test_pkg_specified"
"commands/pkg/test_exec.py::test_unrecognized_options"
2018-10-30 13:38:57 +00:00
"commands/test_ci.py::test_ci_boards"
2019-04-05 09:15:13 +01:00
"commands/test_ci.py::test_ci_build_dir"
"commands/test_ci.py::test_ci_keep_build_dir"
2020-09-12 16:27:02 +01:00
"commands/test_ci.py::test_ci_lib_and_board"
"commands/test_ci.py::test_ci_project_conf"
2018-10-30 13:38:57 +00:00
"commands/test_init.py::test_init_custom_framework"
2020-09-12 16:27:02 +01:00
"commands/test_init.py::test_init_duplicated_boards"
"commands/test_init.py::test_init_enable_auto_uploading"
2018-10-30 13:38:57 +00:00
"commands/test_init.py::test_init_ide_atom"
"commands/test_init.py::test_init_ide_clion"
2018-10-30 13:38:57 +00:00
"commands/test_init.py::test_init_ide_eclipse"
2020-09-12 16:27:02 +01:00
"commands/test_init.py::test_init_ide_vscode"
"commands/test_init.py::test_init_incorrect_board"
2018-10-30 13:38:57 +00:00
"commands/test_init.py::test_init_special_board"
"commands/test_lib.py::test_global_install_archive"
2020-09-12 16:27:02 +01:00
"commands/test_lib.py::test_global_install_registry"
2018-10-30 13:38:57 +00:00
"commands/test_lib.py::test_global_install_repository"
"commands/test_lib.py::test_global_lib_list"
2020-09-12 16:27:02 +01:00
"commands/test_lib.py::test_global_lib_uninstall"
"commands/test_lib.py::test_global_lib_update"
"commands/test_lib.py::test_global_lib_update_check"
"commands/test_lib.py::test_install_duplicates"
"commands/test_lib.py::test_lib_show"
"commands/test_lib.py::test_lib_stats"
"commands/test_lib.py::test_saving_deps"
"commands/test_lib.py::test_search"
"commands/test_lib.py::test_update"
"commands/test_lib_complex.py::test_global_install_archive"
"commands/test_lib_complex.py::test_global_install_registry"
"commands/test_lib_complex.py::test_global_install_repository"
"commands/test_lib_complex.py::test_global_lib_list"
"commands/test_lib_complex.py::test_global_lib_uninstall"
"commands/test_lib_complex.py::test_global_lib_update"
"commands/test_lib_complex.py::test_global_lib_update_check"
"commands/test_lib_complex.py::test_install_duplicates"
"commands/test_lib_complex.py::test_lib_show"
"commands/test_lib_complex.py::test_lib_stats"
"commands/test_lib_complex.py::test_search"
"package/test_manager.py::test_download"
"package/test_manager.py::test_install_force"
"package/test_manager.py::test_install_from_registry"
"package/test_manager.py::test_install_lib_depndencies"
"package/test_manager.py::test_registry"
"package/test_manager.py::test_uninstall"
"package/test_manager.py::test_update_with_metadata"
"package/test_manager.py::test_update_without_metadata"
2018-10-30 13:38:57 +00:00
"test_builder.py::test_build_flags"
"test_builder.py::test_build_unflags"
2020-04-03 14:58:16 +01:00
"test_builder.py::test_debug_custom_build_flags"
2020-09-12 16:27:02 +01:00
"test_builder.py::test_debug_default_build_flags"
2018-10-30 13:38:57 +00:00
"test_misc.py::test_api_cache"
"test_misc.py::test_ping_internet_ips"
2019-09-04 06:59:22 +01:00
"test_misc.py::test_platformio_cli"
2018-10-30 13:38:57 +00:00
"test_pkgmanifest.py::test_packages"
2022-07-17 17:55:46 +01:00
]);
meta = with lib; {
description = "An open source ecosystem for IoT development";
homepage = "https://platformio.org";
license = licenses.asl20;
2018-10-30 13:38:57 +00:00
maintainers = with maintainers; [ mog makefu ];
2022-07-17 17:55:46 +01:00
broken = stdenv.isAarch64;
};
}