mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "cdncheck";
|
|
version = "1.1.22";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "projectdiscovery";
|
|
repo = "cdncheck";
|
|
tag = "v${version}";
|
|
hash = "sha256-EjmQBNYfRl6R01Q3khMqsoYWZM9gG5eiZyJzJrs5ZjQ=";
|
|
};
|
|
|
|
vendorHash = "sha256-/1REkZ5+sz/H4T4lXhloz7fu5cLv1GoaD3dlttN+Qd4=";
|
|
|
|
subPackages = [ "cmd/cdncheck/" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
preCheck = ''
|
|
# Tests require network access
|
|
substituteInPlace other_test.go \
|
|
--replace-fail "TestCheckDomainWithFallback" "SkipTestCheckDomainWithFallback" \
|
|
--replace-fail "TestCheckDNSResponse" "SkipTestCheckDNSResponse"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Tool to detect various technology for a given IP address";
|
|
homepage = "https://github.com/projectdiscovery/cdncheck";
|
|
changelog = "https://github.com/projectdiscovery/cdncheck/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "cdncheck";
|
|
};
|
|
}
|