Skip to content

Commit

Permalink
atf: 0.21-unstable-2021-09-01 -> 0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Dec 27, 2024
1 parent 7cc0bff commit 9a564c3
Show file tree
Hide file tree
Showing 2 changed files with 1,539 additions and 18 deletions.
28 changes: 10 additions & 18 deletions pkgs/by-name/at/atf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,23 @@

stdenv.mkDerivation (finalAttrs: {
pname = "atf";
version = "0.21-unstable-2021-09-01"; # Match the commit used in FreeBSD’s port.
version = "0.22-unstable-2024-12-26";

src = fetchFromGitHub {
owner = "freebsd";
repo = "atf";
rev = "55c21b2c5fb189bbdfccb2b297bfa89236502542";
hash = "sha256-u0YBPcoIBvqBVaytaO9feBaRnQygtzEPGJV0ItI1Vco=";
rev = "f77b0c9a4bad26f19b11faea7a2641c01f6746c0";
hash = "sha256-DJS9R5KyTUbCSNBi3u5XGxDraVMzRR6qm04ooc02Gfc=";
};

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=";
})
# https://github.com/freebsd/atf/issues/88
# https://github.com/freebsd/atf/pull/85
./pr-85.patch
];

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"}' ""
Expand All @@ -60,12 +50,14 @@ stdenv.mkDerivation (finalAttrs: {

makeFlags = [
# ATF isn’t compatible with C++17, which is the default on current clang and GCC.
"CXXFLAGS=-std=c++11"
"CXXFLAGS=-std=c++14"
];

doInstallCheck = true;

nativeInstallCheckInputs = [ kyua ];
nativeInstallCheckInputs = [
kyua
];

installCheckPhase = ''
runHook preInstallCheck
Expand Down
Loading

0 comments on commit 9a564c3

Please sign in to comment.