about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-12-11 22:25:27 +0100
committerPol Dellaiera <pol.dellaiera@protonmail.com>2023-12-11 22:25:27 +0100
commitbd83c540917a575b40e9fefd9b3ae17707e7c84a (patch)
tree6ce04ceb2147927e6fc5c561c8742b7d0d3f2748 /pkgs
parent2275ffd75d61ec5312ce20fe0233d4dac7dd9de6 (diff)
downloadnixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.tar
nixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.tar.gz
nixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.tar.bz2
nixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.tar.lz
nixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.tar.xz
nixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.tar.zst
nixlib-bd83c540917a575b40e9fefd9b3ae17707e7c84a.zip
subnetcalc: use `finalAttrs` pattern
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/networking/subnetcalc/default.nix33
1 files changed, 21 insertions, 12 deletions
diff --git a/pkgs/tools/networking/subnetcalc/default.nix b/pkgs/tools/networking/subnetcalc/default.nix
index 18837785614a..e2d74a586d81 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;
   };
-}
+})