Unverified Commit d9234043 authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

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

parents 6b40448a afceaf4f
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
{
  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";