nbtscanner: add versionCheckHook

+13
+13
pkgs/tools/security/nbtscanner/default.nix
··· 4 4 rustPlatform, 5 5 fetchFromGitHub, 6 6 Security, 7 + versionCheckHook, 7 8 }: 8 9 9 10 rustPlatform.buildRustPackage rec { ··· 23 24 ./Cargo.lock.patch 24 25 ]; 25 26 27 + postPatch = '' 28 + # https://github.com/jonkgrimes/nbtscanner/issues/4 29 + substituteInPlace src/main.rs \ 30 + --replace-fail '.version("0.1")' '.version("${version}")' 31 + ''; 32 + 26 33 buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; 34 + 35 + nativeInstallCheckInputs = [ versionCheckHook ]; 36 + 37 + doInstallCheck = true; 38 + 39 + versionCheckProgramArg = [ "--version" ]; 27 40 28 41 meta = with lib; { 29 42 description = "NetBIOS scanner written in Rust";