lol
1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "zgrab2";
8 version = "unstable-2023-03-23";
9
10 src = fetchFromGitHub {
11 owner = "zmap";
12 repo = pname;
13 rev = "911c86f13080ceae98f8d63d1ae0e85c4a8f7f61";
14 hash = "sha256-VOWkBM/SziY3jiIaYYWq+LRzG4vKitiscqdIDfRUkYY=";
15 };
16
17 vendorHash = "sha256-Q3FCqvh4vn64QXqcePhVWTyIHJarI6I4YonH3X/7RhI=";
18
19 patches = [
20 # Without this, we get error messages like:
21 # vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
22 # The patch was generated by changing "go 1.12" to "go 1.17" and executing `go mod tidy -compat=1.17`.
23 ./fix-go-version-error.patch
24 ];
25
26 subPackages = [
27 "cmd/zgrab2"
28 ];
29
30 meta = with lib; {
31 description = "Web application scanner";
32 mainProgram = "zgrab2";
33 homepage = "https://github.com/zmap/zgrab2";
34 license = with licenses; [ asl20 isc ];
35 maintainers = with maintainers; [ fab juliusrickert ];
36 };
37}