diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-12-11 22:25:27 +0100 |
---|---|---|
committer | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-12-11 22:25:27 +0100 |
commit | bd83c540917a575b40e9fefd9b3ae17707e7c84a (patch) | |
tree | 6ce04ceb2147927e6fc5c561c8742b7d0d3f2748 /pkgs/tools/networking/subnetcalc | |
parent | 2275ffd75d61ec5312ce20fe0233d4dac7dd9de6 (diff) |
subnetcalc: use `finalAttrs` pattern
Diffstat (limited to 'pkgs/tools/networking/subnetcalc')
-rw-r--r-- | pkgs/tools/networking/subnetcalc/default.nix | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/pkgs/tools/networking/subnetcalc/default.nix b/pkgs/tools/networking/subnetcalc/default.nix index 18837785614a7..e2d74a586d81a 100644 --- a/pkgs/tools/networking/subnetcalc/default.nix +++ b/pkgs/tools/networking/subnetcalc/default.nix @@ -1,20 +1,30 @@ -{ lib, stdenv, fetchFromGitHub, cmake, ninja }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, ninja +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "subnetcalc"; version = "2.4.23"; src = fetchFromGitHub { owner = "dreibh"; - repo = pname; - rev = "${pname}-${version}"; - sha256 = "sha256-uX/roOWjeuuuEFpBbF+hEPDOo0RTR79WpyNvr9U7wR4="; + repo = "subnetcalc"; + rev = "subnetcalc-${finalAttrs.version}"; + hash = "sha256-uX/roOWjeuuuEFpBbF+hEPDOo0RTR79WpyNvr9U7wR4="; }; - nativeBuildInputs = [ cmake ninja ]; + nativeBuildInputs = [ + cmake + ninja + ]; - meta = with lib; { + meta = { description = "SubNetCalc is an IPv4/IPv6 subnet address calculator"; + homepage = "https://www.uni-due.de/~be0001/subnetcalc/"; + license = lib.licenses.gpl3Plus; longDescription = '' SubNetCalc is an IPv4/IPv6 subnet address calculator. For given IPv4 or IPv6 address and netmask or prefix length, it calculates network address, @@ -23,9 +33,8 @@ stdenv.mkDerivation rec { Furthermore, it prints useful information on specific address types (e.g. type, scope, interface ID, etc.). ''; - homepage = "https://www.uni-due.de/~be0001/subnetcalc/"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ atila ]; - platforms = platforms.unix; + mainProgram = "subnetcalc"; + maintainers = with lib.maintainers; [ atila ]; + platforms = lib.platforms.unix; }; -} +}) |