Unverified Commit 2b82ae08 authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

netboot: unbreak GCC 14, modernize (#394375)

parents a7bd1078 4e7642cb
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -5,15 +5,16 @@
  bison,
  lzo,
  db4,
  versionCheckHook,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "netboot";
  version = "0.10.2";

  src = fetchurl {
    url = "mirror://sourceforge/netboot/netboot-${version}.tar.gz";
    sha256 = "09w09bvwgb0xzn8hjz5rhi3aibysdadbg693ahn8rylnqfq4hwg0";
    url = "mirror://sourceforge/netboot/netboot-${finalAttrs.version}.tar.gz";
    hash = "sha256-4HFIsMOW+owsVCOZt5pq2q+oRoS5fAmR/R2sx/dKgCc=";
  };

  buildInputs = [
@@ -24,17 +25,25 @@ stdenv.mkDerivation rec {

  hardeningDisable = [ "format" ];

  # mgllex.l:398:53: error: passing argument 1 of 'copy_string' from incompatible pointer type []
  env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";

  # Disable parallel build, errors:
  #  link: `parseopt.lo' is not a valid libtool object
  enableParallelBuilding = false;

  meta = with lib; {
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgram = "${placeholder "out"}/bin/nbdbtool";
  versionCheckProgramArg = "--version";
  doInstallCheck = true;

  meta = {
    description = "Mini PXE server";
    maintainers = [ maintainers.raskin ];
    maintainers = with lib.maintainers; [ raskin ];
    platforms = [
      "x86_64-linux"
      "aarch64-linux"
    ];
    license = lib.licenses.free;
    license = lib.licenses.gpl2Only;
  };
}
})