nbtscanner: add versionCheckHook

+13
+13
pkgs/tools/security/nbtscanner/default.nix
··· 4 rustPlatform, 5 fetchFromGitHub, 6 Security, 7 }: 8 9 rustPlatform.buildRustPackage rec { ··· 23 ./Cargo.lock.patch 24 ]; 25 26 buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; 27 28 meta = with lib; { 29 description = "NetBIOS scanner written in Rust";
··· 4 rustPlatform, 5 fetchFromGitHub, 6 Security, 7 + versionCheckHook, 8 }: 9 10 rustPlatform.buildRustPackage rec { ··· 24 ./Cargo.lock.patch 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 + 33 buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; 34 + 35 + nativeInstallCheckInputs = [ versionCheckHook ]; 36 + 37 + doInstallCheck = true; 38 + 39 + versionCheckProgramArg = [ "--version" ]; 40 41 meta = with lib; { 42 description = "NetBIOS scanner written in Rust";