From 4e7642cb012aa39bb27ffbf9b27cf834f764139b Mon Sep 17 00:00:00 2001 From: Petr Zahradnik Date: Sat, 29 Mar 2025 18:08:24 +0100 Subject: [PATCH] netboot: modernize --- pkgs/by-name/ne/netboot/package.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ne/netboot/package.nix b/pkgs/by-name/ne/netboot/package.nix index 07b020907e06..48c427cb4134 100644 --- a/pkgs/by-name/ne/netboot/package.nix +++ b/pkgs/by-name/ne/netboot/package.nix @@ -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 = [ @@ -31,13 +32,18 @@ stdenv.mkDerivation rec { # 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; }; -} +})