2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv, lib, git, openssl, makeWrapper, buildPythonApplication, pytestCheckHook, ps
|
2022-01-03 16:56:52 +00:00
|
|
|
, fetchPypi, fetchFromGitLab, sudo }:
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "pmbootstrap";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.50.1";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-2S3I3J3wmRkVSUshyQCUTuYgHLsDMnXZQHt7KySBzIY=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
repo = fetchFromGitLab {
|
|
|
|
domain = "gitlab.com";
|
|
|
|
owner = "postmarketOS";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-UkgCNob4nazFO8xXyosV+11Sj4yveYBfgh7aw+/6Rlg=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pmb_test = "${repo}/test";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# Tests depend on sudo
|
|
|
|
doCheck = stdenv.isLinux;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook git openssl ps sudo ];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
# Add test dependency in PATH
|
2021-12-06 16:07:01 +00:00
|
|
|
preCheck = "export PYTHONPATH=$PYTHONPATH:${pmb_test}";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
# skip impure tests
|
|
|
|
disabledTests = [
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_apk_static"
|
|
|
|
"test_aportgen"
|
|
|
|
"test_aportgen_device_wizard"
|
|
|
|
"test_bootimg"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_build_depends_binary_outdated"
|
|
|
|
"test_build_depends_high_level"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_build_depends_no_binary_error"
|
|
|
|
"test_build_is_necessary"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_build_local_source_high_level"
|
|
|
|
"test_build_src_invalid_path"
|
|
|
|
"test_can_fast_forward"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_check_build_for_arch"
|
|
|
|
"test_chroot_arguments"
|
|
|
|
"test_chroot_interactive_shell"
|
|
|
|
"test_chroot_interactive_shell_user"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_clean_worktree"
|
|
|
|
"test_config_user"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_cross_compile_distcc"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_crossdirect"
|
|
|
|
"test_file"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_filter_aport_packages"
|
|
|
|
"test_filter_missing_packages_binary_exists"
|
|
|
|
"test_filter_missing_packages_invalid"
|
|
|
|
"test_filter_missing_packages_pmaports"
|
|
|
|
"test_finish"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_folder_size"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_get_apkbuild"
|
|
|
|
"test_get_depends"
|
|
|
|
"test_get_upstream_remote"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_helpers_lint"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_helpers_package_get_apkindex"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_helpers_repo"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_helpers_ui"
|
|
|
|
"test_init_buildenv"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_kconfig_check"
|
|
|
|
"test_keys"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_newapkbuild"
|
|
|
|
"test_package"
|
|
|
|
"test_package_from_aports"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_pkgrel_bump"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_pmbootstrap_status"
|
|
|
|
"test_print_checks_git_repo"
|
|
|
|
"test_pull"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_qemu_running_processes"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_questions_additional_options"
|
|
|
|
"test_questions_bootimg"
|
|
|
|
"test_questions_channel"
|
|
|
|
"test_questions_keymaps"
|
|
|
|
"test_questions_work_path"
|
|
|
|
"test_read_config_channel"
|
|
|
|
"test_recurse_invalid"
|
|
|
|
"test_run_abuild"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_run_core"
|
|
|
|
"test_shell_escape"
|
2022-01-03 16:56:52 +00:00
|
|
|
"test_skip_already_built"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_switch_to_channel_branch"
|
2021-05-28 09:39:13 +00:00
|
|
|
"test_version"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ git openssl ]}" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Sophisticated chroot/build/flash tool to develop and install postmarketOS";
|
|
|
|
homepage = "https://gitlab.com/postmarketOS/pmbootstrap";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-01-03 16:56:52 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
}
|