Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-24.11' into staging-next…
Browse files Browse the repository at this point in the history
…-24.11
  • Loading branch information
mweinelt committed Jan 5, 2025
2 parents 7672c85 + ed61393 commit 2a9538d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1,549 deletions.
29 changes: 16 additions & 13 deletions pkgs/by-name/at/atf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,33 @@

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

src = fetchFromGitHub {
owner = "freebsd";
repo = "atf";
tag = "atf-${finalAttrs.version}";
hash = "sha256-vZfBk/lH+04d3NbTUYjAaxwGFHtnagl/kY04hgkE4Iw=";
rev = "55c21b2c5fb189bbdfccb2b297bfa89236502542";
hash = "sha256-u0YBPcoIBvqBVaytaO9feBaRnQygtzEPGJV0ItI1Vco=";
};

patches = [
# https://github.com/freebsd/atf/issues/88
# https://github.com/freebsd/atf/pull/85
# Maintainer say it fix some tests in issue 88.
./pr-85.patch
# 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 {
url = "https://github.com/freebsd/atf/commit/b42c98612cb99fa3f52766a46203263dc1de7187.patch?full_index=1";
hash = "sha256-goDPIdIF8vHXDengVIYbxw5W/JT5kfsG5japgtranas=";
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"}' ""
Expand All @@ -55,14 +60,12 @@ stdenv.mkDerivation (finalAttrs: {

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

doInstallCheck = true;

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

installCheckPhase = ''
runHook preInstallCheck
Expand Down
Loading

0 comments on commit 2a9538d

Please sign in to comment.