man-db: fix tests for groff 1.23.0

Enable tests on Darwin
This commit is contained in:
Alexis Hildebrandt 2023-07-20 23:30:23 +02:00
parent ac63d48eb1
commit 06a02d3a8c

View File

@ -1,6 +1,7 @@
{ buildPackages
, db
, fetchurl
, fetchpatch
, groff
, gzip
, lib
@ -20,7 +21,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://savannah/man-db/man-db-${version}.tar.xz";
sha256 = "sha256-z/oe5Ol0vnhkbEZQjm3S8358WJqqspOMwQZPBY/vn40=";
hash = "sha256-z/oe5Ol0vnhkbEZQjm3S8358WJqqspOMwQZPBY/vn40=";
};
outputs = [ "out" "doc" ];
@ -31,7 +32,35 @@ stdenv.mkDerivation rec {
buildInputs = [ libpipeline db groff ]; # (Yes, 'groff' is both native and build input)
nativeCheckInputs = [ libiconv /* for 'iconv' binary */ ];
patches = [ ./systemwide-man-db-conf.patch ];
patches = [
./systemwide-man-db-conf.patch
# Remove the patches below when updating to the next man-db release.
# Patches addressing https://gitlab.com/man-db/man-db/-/issues/25 ...
(fetchpatch {
name = "update-warning-regex";
url = "https://gitlab.com/man-db/man-db/-/commit/b12ffb9df7.patch";
hash = "sha256-F+whRppaMZwgmGPKTXu2j1vZMNAm3vGNzNZcz9pg8Jc=";
})
(fetchpatch {
name = "fix-test-failures-when-iconv-not-available";
url = "https://gitlab.com/man-db/man-db/-/commit/26f46a60e5.patch";
hash = "sha256-W1a6GkYn4J3py7GLZc37xmQBQR18Xvcvj4fJoZ21+0k=";
# The following files are excluded from the patch as they fail to apply
# cleanly on the 2.11.2 sources and are deemed irrelevant for building man-db.
excludes = [ "NEWS.md" ];
})
# ... and https://gitlab.com/man-db/man-db/-/issues/26.
(fetchpatch {
name = "improve-lexgrog-portability";
url = "https://gitlab.com/man-db/man-db/-/commit/bbf7701c4f.patch";
hash = "sha256-QLOVgV0S2NxxTBObD8bJFR1QDH0p2RGMJXLVNagfddc=";
})
(fetchpatch {
name = "avoid-translation-fallout-from-lexgrog-fix";
url = "https://gitlab.com/man-db/man-db/-/commit/043c3cb83c.patch";
hash = "sha256-w12/LOGN9gO85zmqX7zookA55w3WUxBMJgWInpH5wms=";
})
];
postPatch = ''
# Remove all mandatory manpaths. Nixpkgs makes no requirements on
@ -79,7 +108,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = !stdenv.hostPlatform.isMusl /* iconv binary */ && !stdenv.hostPlatform.isDarwin;
doCheck = !stdenv.hostPlatform.isMusl /* iconv binary */;
passthru.tests = {
nixos = nixosTests.man;