unfs3: fix build on gcc-14 (#389081)

This commit is contained in:
Arne Keller
2025-03-15 23:12:54 +01:00
committed by GitHub
+27
View File
@@ -1,5 +1,6 @@
{
fetchFromGitHub,
fetchpatch2,
lib,
stdenv,
flex,
@@ -7,6 +8,8 @@
autoreconfHook,
pkg-config,
libtirpc,
versionCheckHook,
nix-update-script,
}:
stdenv.mkDerivation rec {
@@ -20,6 +23,14 @@ stdenv.mkDerivation rec {
hash = "sha256-5iAriIutBhwyZVS7AG2fnkrHOI7pNAKfYv062Cy0WXw=";
};
patches = [
# Fix implicit declaration warning with GCC 14
(fetchpatch2 {
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/152dc14a65a89f253294cc5b4c96cf0d6658711a/main/unfs3/implicit.patch";
hash = "sha256-zrF87fJhc8mDgIs0vsMoqIHYQPtKWn2XMBSePvHOByA=";
})
];
nativeBuildInputs = [
flex
bison
@@ -33,6 +44,22 @@ stdenv.mkDerivation rec {
doCheck = false; # no test suite
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/unfsd";
versionCheckProgramArg = [ "-h" ];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"${pname}-(.*)"
];
};
};
meta = {
description = "User-space NFSv3 file system server";