2021-07-11 00:15:40 +01:00
|
|
|
{ stdenv, lib, python3
|
|
|
|
, fetchFromGitHub
|
2021-03-18 09:47:35 +00:00
|
|
|
, git
|
|
|
|
, spdx-license-list-data
|
2020-11-24 13:36:19 +00:00
|
|
|
, version, src
|
2017-09-29 14:05:31 +01:00
|
|
|
}:
|
|
|
|
|
2018-10-30 13:38:57 +00:00
|
|
|
let
|
2021-07-11 00:15:40 +01:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
aiofiles = super.aiofiles.overridePythonAttrs (oldAttrs: rec {
|
2021-08-24 10:18:30 +01:00
|
|
|
pname = "aiofiles";
|
2021-07-11 00:15:40 +01:00
|
|
|
version = "0.6.0";
|
2021-08-24 10:18:30 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tinche";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0w23d88q65m06884pfcps661clr11w9wm701ihx6kfxjwga6fkzf";
|
2021-07-11 00:15:40 +01:00
|
|
|
};
|
2021-08-24 10:18:30 +01:00
|
|
|
doCheck = false;
|
2021-07-11 00:15:40 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
click = super.click.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "7.1.2";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
uvicorn = super.uvicorn.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.13.2";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = "uvicorn";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
with python.pkgs; buildPythonApplication rec {
|
|
|
|
pname = "platformio";
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ajsonrpc
|
|
|
|
bottle
|
|
|
|
click
|
|
|
|
click-completion
|
|
|
|
colorama
|
|
|
|
git
|
|
|
|
lockfile
|
|
|
|
marshmallow
|
|
|
|
pyelftools
|
|
|
|
pyserial
|
|
|
|
requests
|
|
|
|
semantic-version
|
|
|
|
starlette
|
|
|
|
tabulate
|
|
|
|
uvicorn
|
|
|
|
wsproto
|
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
|
|
|
|
HOME = "/tmp";
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
jsondiff
|
|
|
|
pytestCheckHook
|
|
|
|
tox
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = (map (e: "--deselect tests/${e}") [
|
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_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"
|
2018-10-30 13:38:57 +00:00
|
|
|
"commands/test_test.py::test_local_env"
|
2020-09-12 16:27:02 +01:00
|
|
|
"commands/test_test.py::test_multiple_env_build"
|
|
|
|
"commands/test_test.py::test_setup_teardown_are_compilable"
|
|
|
|
"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"
|
|
|
|
]) ++ (map (e: "--ignore=tests/${e}") [
|
|
|
|
"commands/test_boards.py"
|
2020-01-19 22:51:45 +00:00
|
|
|
"commands/test_check.py"
|
2018-10-30 13:38:57 +00:00
|
|
|
"commands/test_platform.py"
|
|
|
|
"commands/test_update.py"
|
|
|
|
"test_maintenance.py"
|
|
|
|
"test_ino2cpp.py"
|
2021-07-11 00:15:40 +01:00
|
|
|
]) ++ [
|
|
|
|
"tests"
|
2017-09-29 14:05:31 +01:00
|
|
|
];
|
|
|
|
|
2020-01-19 22:51:45 +00:00
|
|
|
patches = [
|
|
|
|
./fix-searchpath.patch
|
|
|
|
./use-local-spdx-license-list.patch
|
2020-06-29 18:45:27 +01:00
|
|
|
./missing-udev-rules-nixos.patch
|
2020-01-19 22:51:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substitute platformio/package/manifest/schema.py platformio/package/manifest/schema.py \
|
|
|
|
--subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data}'
|
2021-05-18 05:23:43 +01:00
|
|
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "zeroconf==0.28.*" "zeroconf"
|
2020-01-19 22:51:45 +00:00
|
|
|
'';
|
2017-09-29 14:05:31 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-30 13:38:57 +00:00
|
|
|
broken = stdenv.isAarch64;
|
2017-09-29 14:05:31 +01:00
|
|
|
description = "An open source ecosystem for IoT development";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://platformio.org";
|
2017-09-29 14:05:31 +01:00
|
|
|
license = licenses.asl20;
|
2018-10-30 13:38:57 +00:00
|
|
|
maintainers = with maintainers; [ mog makefu ];
|
2017-09-29 14:05:31 +01:00
|
|
|
};
|
|
|
|
}
|