Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "nbtscanner";
|
|
version = "0.0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jonkgrimes";
|
|
repo = "nbtscanner";
|
|
tag = version;
|
|
hash = "sha256-lnTTutOc829COwfNhBkSK8UpiNnGsm7Da53b+eSBt1Q=";
|
|
};
|
|
|
|
cargoHash = "sha256-/gVJJegPIUe0Mv7+0tCP/vWrMbImtY3tb+lELnn1ur0=";
|
|
|
|
cargoPatches = [
|
|
./Cargo.lock.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
# https://github.com/jonkgrimes/nbtscanner/issues/4
|
|
substituteInPlace src/main.rs \
|
|
--replace-fail '.version("0.1")' '.version("${version}")'
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
doInstallCheck = true;
|
|
|
|
versionCheckProgramArg = "--version";
|
|
|
|
meta = {
|
|
description = "NetBIOS scanner written in Rust";
|
|
homepage = "https://github.com/jonkgrimes/nbtscanner";
|
|
changelog = "https://github.com/jonkgrimes/nbtscanner/releases/tag/${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "nbtscanner";
|
|
};
|
|
}
|