Skip to content

Commit 4e7642c

Browse files
committed
netboot: modernize
1 parent 61f4f97 commit 4e7642c

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

pkgs/by-name/ne/netboot/package.nix

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
bison,
66
lzo,
77
db4,
8+
versionCheckHook,
89
}:
910

10-
stdenv.mkDerivation rec {
11+
stdenv.mkDerivation (finalAttrs: {
1112
pname = "netboot";
1213
version = "0.10.2";
1314

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

1920
buildInputs = [
@@ -31,13 +32,18 @@ stdenv.mkDerivation rec {
3132
# link: `parseopt.lo' is not a valid libtool object
3233
enableParallelBuilding = false;
3334

34-
meta = with lib; {
35+
nativeInstallCheckInputs = [ versionCheckHook ];
36+
versionCheckProgram = "${placeholder "out"}/bin/nbdbtool";
37+
versionCheckProgramArg = "--version";
38+
doInstallCheck = true;
39+
40+
meta = {
3541
description = "Mini PXE server";
36-
maintainers = [ maintainers.raskin ];
42+
maintainers = with lib.maintainers; [ raskin ];
3743
platforms = [
3844
"x86_64-linux"
3945
"aarch64-linux"
4046
];
41-
license = lib.licenses.free;
47+
license = lib.licenses.gpl2Only;
4248
};
43-
}
49+
})

0 commit comments

Comments
 (0)