diff --git a/pkgs/by-name/un/unfs3/package.nix b/pkgs/by-name/un/unfs3/package.nix index e02b86f0fa05..28624ce53a26 100644 --- a/pkgs/by-name/un/unfs3/package.nix +++ b/pkgs/by-name/un/unfs3/package.nix @@ -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";