Files
nixpkgs/pkgs/by-name/ip/ip2asn/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ip2asn";
version = "0.1.2";
src = fetchFromGitHub {
owner = "x123";
repo = "ip2asn";
tag = finalAttrs.version;
hash = "sha256-2wuxBwllrkPdmmBCt7DPQ38E2k3igAjbICun51bhopY=";
};
cargoHash = "sha256-fYg0aIU8usueMg6cMWUcwMIFCinHdm6H7k9ywZGYfg8=";
passthru.updateScript = nix-update-script { };
cargoBuildFlags = [
"-p"
"ip2asn-cli"
];
# disable network based tests that download data
cargoTestFlags = [
"-p"
"ip2asn-cli"
"--"
"--skip"
"auto_update_tests::test_auto_update_triggers_download"
"--skip"
"auto_update_tests::test_auto_update_skips_check_for_recent_cache"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
meta = {
description = "CLI tool for mapping IP addresses to Autonomous System information";
homepage = "https://github.com/x123/ip2asn/tree/master/ip2asn-cli";
changelog = "https://github.com/x123/ip2asn/blob/${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ x123 ];
mainProgram = "ip2asn";
};
})