-
-
Notifications
You must be signed in to change notification settings - Fork 18k
darwin.libiconv: 50 -> 99 and move to pkgs/by-name #301354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0b0685a
atf: init at 0.21-unstable-2021-09-01
reckenrode 7709e10
lutok: init at 0.4
reckenrode a3d75b1
kyua: init at 0.13-unstable-2024-01-22
reckenrode 60fb2a6
libiconv: expose setup hooks for use by other libiconv implementations
reckenrode 3157d72
libiconv-darwin: init at 99
reckenrode ad38102
darwin.stdenv: avoid an infinite recursion
reckenrode 89c9b73
darwin.stdenv: propagate atf and kyua
reckenrode c88b490
libiconv: use libiconv-darwin
reckenrode e7b5b44
darwin.libiconv: remove and add to darwin-aliases
reckenrode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchFromGitHub, | ||
| fetchpatch, | ||
| autoreconfHook, | ||
| kyua, | ||
| pkg-config, | ||
| gitUpdater, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "atf"; | ||
| version = "0.21-unstable-2021-09-01"; # Match the commit used in FreeBSD’s port. | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "freebsd"; | ||
| repo = "atf"; | ||
| rev = "55c21b2c5fb189bbdfccb2b297bfa89236502542"; | ||
| hash = "sha256-u0YBPcoIBvqBVaytaO9feBaRnQygtzEPGJV0ItI1Vco="; | ||
| }; | ||
|
|
||
| patches = [ | ||
| # Fixes use after free that causes failures in Kyua’s test suite. | ||
| # https://github.com/freebsd/atf/pull/57 | ||
| # https://github.com/freebsd/kyua/issues/223 | ||
| (fetchpatch { | ||
| name = "fix-use-after-free.patch"; | ||
| url = "https://github.com/freebsd/atf/commit/fb22f3837bcfdce5ce8b3c0e18af131bb6902a02.patch"; | ||
| hash = "sha256-p4L3sxSYfMSzwKrUDlEZpoJydbaK3Hcbvn90KlPHkic="; | ||
| }) | ||
| ]; | ||
|
|
||
| postPatch = | ||
| lib.optionalString finalAttrs.doInstallCheck '' | ||
| # https://github.com/freebsd/atf/issues/61 | ||
| substituteInPlace atf-c/check_test.c \ | ||
| --replace-fail 'ATF_TP_ADD_TC(tp, build_cpp)' "" | ||
| substituteInPlace atf-c++/check_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, build_cpp);' "" | ||
| # Can’t find `c_helpers` in the work folder. | ||
| substituteInPlace test-programs/Kyuafile \ | ||
| --replace-fail 'atf_test_program{name="srcdir_test"}' "" | ||
| '' | ||
| # These tests fail on Darwin. | ||
| + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isDarwin) '' | ||
| substituteInPlace atf-c/detail/process_test.c \ | ||
| --replace-fail 'ATF_TP_ADD_TC(tp, status_coredump);' "" | ||
| '' | ||
| # This test fails on Linux. | ||
| + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isLinux) '' | ||
| substituteInPlace atf-c/detail/fs_test.c \ | ||
| --replace-fail 'ATF_TP_ADD_TC(tp, eaccess);' "" | ||
| ''; | ||
|
|
||
| strictDeps = true; | ||
|
|
||
| nativeBuildInputs = [ autoreconfHook ]; | ||
|
|
||
| enableParallelBuilding = true; | ||
|
|
||
| makeFlags = [ | ||
| # ATF isn’t compatible with C++17, which is the default on current clang and GCC. | ||
| "CXXFLAGS=-std=c++11" | ||
| ]; | ||
|
|
||
| doInstallCheck = true; | ||
|
|
||
| nativeInstallCheckInputs = [ kyua ]; | ||
|
|
||
| installCheckPhase = '' | ||
| runHook preInstallCheck | ||
| HOME=$TMPDIR PATH=$out/bin:$PATH kyua test | ||
| runHook postInstallCheck | ||
| ''; | ||
|
|
||
| passthru.updateScript = gitUpdater { rev-prefix = "atf-"; }; | ||
|
|
||
| __structuredAttrs = true; | ||
|
|
||
| meta = { | ||
| description = "Libraries to write tests in C, C++, and shell"; | ||
| homepage = "https://github.com/freebsd/atf/"; | ||
| license = lib.licenses.bsd3; | ||
| mainProgram = "atf-sh"; | ||
| maintainers = with lib.maintainers; [ reckenrode ]; | ||
| platforms = lib.platforms.unix; | ||
| }; | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| kyuaCheckPhase() { | ||
| runHook preCheck | ||
| # Kyua expects to save test results in ~/.kyua/store | ||
| HOME=$TMPDIR kyua test | ||
| runHook postCheck | ||
| } | ||
|
|
||
| if [ -z "${dontUseKyuaCheck-}" ] && [ -z "${checkPhase-}" ]; then | ||
| checkPhase=kyuaCheckPhase | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchFromGitHub, | ||
| atf, | ||
| autoreconfHook, | ||
| lutok, | ||
| pkg-config, | ||
| sqlite, | ||
| gitUpdater, | ||
| }: | ||
|
|
||
| let | ||
| # Avoid an infinite recursion (because ATF uses Kyua for testing). | ||
| atf' = atf.overrideAttrs (_: { | ||
| doInstallCheck = false; | ||
| }); | ||
| in | ||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "kyua"; | ||
| version = "0.13-unstable-2024-01-22"; # Match the commit used in FreeBSD’s port. | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "freebsd"; | ||
| repo = "kyua"; | ||
| rev = "c85354e09ad93a902c9e8a701c042c045ec2a5b7"; | ||
| hash = "sha256-fZ0WFgOTj8Gw8IT5O8DnuaNyZscKpg6B94m+l5UoZGc"; | ||
| }; | ||
|
|
||
| setupHooks = ./kyua-check-hook.sh; | ||
|
|
||
| postPatch = | ||
| '' | ||
| # Fix a linking error on Darwin. Embedding an archive in an archive isn’t portable. | ||
| substituteInPlace cli/Makefile.am.inc \ | ||
| --replace-fail 'libcli_a_LIBADD = libutils.a' "" \ | ||
| --replace-fail 'CLI_LIBS = ' 'CLI_LIBS = libutils.a ' | ||
| '' | ||
| # These tests fail on Darwin or are unreliable. | ||
| + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isDarwin) '' | ||
| sed -i utils/process/Makefile.am.inc -e '/executor_pid_test/d' | ||
toonn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| substituteInPlace utils/process/Kyuafile \ | ||
| --replace-fail 'atf_test_program{name="executor_pid_test"}' "" | ||
| substituteInPlace engine/atf_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, test__body_only__crashes);' "" | ||
| substituteInPlace engine/scheduler_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, integration__stacktrace);' "" | ||
| substituteInPlace utils/stacktrace_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, unlimit_core_size);' "" | ||
| substituteInPlace utils/process/isolation_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, isolate_child__enable_core_dumps);' "" | ||
| substituteInPlace utils/process/operations_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, terminate_self_with__termsig_and_core);' "" | ||
| substituteInPlace utils/process/status_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, integration__coredump);' "" | ||
| substituteInPlace integration/cmd_test_test.sh \ | ||
| --replace-fail 'atf_add_test_case premature_exit' "" | ||
| '' | ||
| # fchflags and UF_NOUNLINK are not supported on Linux. Other tests also fail. | ||
| + lib.optionalString (finalAttrs.doInstallCheck && stdenv.isLinux) '' | ||
| sed -i utils/process/Makefile.am.inc -e '/executor_pid_test/d' | ||
| substituteInPlace utils/process/Kyuafile \ | ||
| --replace-fail 'atf_test_program{name="executor_pid_test"}' "" | ||
| substituteInPlace engine/atf_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, test__body_only__crashes);' "" | ||
| substituteInPlace utils/stacktrace_test.cpp \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, dump_stacktrace__ok);' "" \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, dump_stacktrace_if_available__append);' "" \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, find_core__found__long);' "" \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, find_core__found__short);' "" \ | ||
| --replace-fail 'ATF_ADD_TEST_CASE(tcs, unlimit_core_size__hard_is_zero);' "" | ||
| substituteInPlace integration/cmd_test_test.sh \ | ||
| --replace-fail 'atf_add_test_case premature_exit' "" | ||
| ''; | ||
|
|
||
| strictDeps = true; | ||
|
|
||
| buildInputs = [ | ||
| lutok | ||
| sqlite | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| atf' | ||
| autoreconfHook | ||
| pkg-config | ||
| ]; | ||
|
|
||
| enableParallelBuilding = true; | ||
|
|
||
| makeFlags = [ | ||
| # Kyua isn’t compatible with C++17, which is the default on current clang and GCC. | ||
| "CXXFLAGS=-std=c++11" | ||
| ]; | ||
|
|
||
| doInstallCheck = true; | ||
|
|
||
| installCheckInputs = [ atf' ]; | ||
| nativeInstallCheckInputs = [ sqlite ]; | ||
|
|
||
| installCheckPhase = '' | ||
| runHook preInstallCheck | ||
| HOME=$TMPDIR PATH=$out/bin:$PATH kyua test | ||
| runHook postInstallCheck | ||
| ''; | ||
|
|
||
| passthru.updateScript = gitUpdater { rev-prefix = "kyua-"; }; | ||
|
|
||
| __structuredAttrs = true; | ||
|
|
||
| meta = { | ||
| description = "Testing framework for infrastructure software"; | ||
| homepage = "https://github.com/freebsd/kyua/"; | ||
| license = lib.licenses.bsd3; | ||
| mainProgram = "kyua"; | ||
| maintainers = with lib.maintainers; [ reckenrode ]; | ||
| platforms = lib.platforms.unix; | ||
| }; | ||
| }) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.