nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 makeWrapper,
6 iw,
7}:
8let
9 pname = "netscanner";
10 version = "0.6.41";
11in
12rustPlatform.buildRustPackage {
13 inherit pname version;
14
15 nativeBuildInputs = [ makeWrapper ];
16
17 src = fetchFromGitHub {
18 owner = "Chleba";
19 repo = "netscanner";
20 tag = "v${version}";
21 hash = "sha256-8Srsts0FDLMT01YW5Guv3r8yx5i5ua7bhAFbQ5BMN74=";
22 };
23
24 cargoHash = "sha256-vlV5SibQlJ/yhJJKweqg6KYinpgZmWUUnyzAS6LBBKw=";
25
26 postFixup = ''
27 wrapProgram $out/bin/netscanner \
28 --prefix PATH : "${lib.makeBinPath [ iw ]}"
29 '';
30
31 meta = {
32 description = "Network scanner with features like WiFi scanning, packetdump and more";
33 homepage = "https://github.com/Chleba/netscanner";
34 changelog = "https://github.com/Chleba/netscanner/releases/tag/v${version}";
35 license = lib.licenses.mit;
36 maintainers = with lib.maintainers; [ NotAShelf ];
37 mainProgram = "netscanner";
38 };
39}