2023-12-11 21:25:27 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
}:
|
2022-04-24 15:31:20 +00:00
|
|
|
|
2023-12-11 21:25:27 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-04-24 15:31:20 +00:00
|
|
|
pname = "subnetcalc";
|
2024-02-15 15:00:38 +00:00
|
|
|
version = "2.5.1";
|
2022-04-24 15:31:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dreibh";
|
2023-12-11 21:25:27 +00:00
|
|
|
repo = "subnetcalc";
|
|
|
|
rev = "subnetcalc-${finalAttrs.version}";
|
2024-02-15 15:00:38 +00:00
|
|
|
hash = "sha256-uP2T7c5aBvOsuJK648WNWO9WmRN4WCRlAIBFYTYyUkw=";
|
2022-04-24 15:31:20 +00:00
|
|
|
};
|
|
|
|
|
2023-12-11 21:25:27 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
];
|
2022-04-24 15:31:20 +00:00
|
|
|
|
2023-12-11 21:25:27 +00:00
|
|
|
meta = {
|
2022-04-24 15:31:20 +00:00
|
|
|
description = "SubNetCalc is an IPv4/IPv6 subnet address calculator";
|
2023-12-11 21:25:27 +00:00
|
|
|
homepage = "https://www.uni-due.de/~be0001/subnetcalc/";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
2022-04-24 15:31:20 +00:00
|
|
|
longDescription = ''
|
|
|
|
SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or
|
|
|
|
IPv6 address and netmask or prefix length, it calculates network address,
|
|
|
|
broadcast address, maximum number of hosts and host address range. Also,
|
|
|
|
it prints the addresses in binary format for better understandability.
|
|
|
|
Furthermore, it prints useful information on specific address types (e.g.
|
|
|
|
type, scope, interface ID, etc.).
|
|
|
|
'';
|
2023-12-11 21:25:27 +00:00
|
|
|
mainProgram = "subnetcalc";
|
|
|
|
maintainers = with lib.maintainers; [ atila ];
|
|
|
|
platforms = lib.platforms.unix;
|
2022-04-24 15:31:20 +00:00
|
|
|
};
|
2023-12-11 21:25:27 +00:00
|
|
|
})
|