Subject: [bug#47540] [PATCH] gnu: Add prips.

From: david larsson <[email-masked]>
Date: Thu, 08 Apr 2021 21:28:59 +0200

On 2021-04-06 16:04, Maxime Devos wrote:

> Add ‘(native-inputs `(("perl-test-harness" ,perl-test-harness)))’ such 
> that
> the makefile can find the 'prove' binary.

Fixed.

> 
> Add ‘#:test-target "test"’ here, as the makefile has a 'test' target
> instead of a 'check' target.
> 
>> +       #:phases (modify-phases %standard-phases
>> +                  (delete 'configure)
>> +                  (delete 'check)
> 
> and remove the (delete 'check).

Fixed.

> The package now builds successfully for me.

For me as well.

> Greetings,
> Maxime.

Thanks for your review and help with improving this package!

Best regards,
David

From 85cf7b9d22801d9b3bac8956b358fce4c32dcb4c Mon Sep 17 00:00:00 2001
From: methuselah-0 <[email-masked]>
Date: Thu, 8 Apr 2021 21:26:23 +0200
Subject: [PATCH] gnu: Add prips.

gnu/packages/admin.scm (prips): New variable.
---
 gnu/packages/admin.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index df7973395d..15ac8841c6 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2021 Stefan Reichör <[email-masked]>
 ;;; Copyright © 2021 qblade <[email-masked]>
 ;;; Copyright © 2021 Hyunseok Kim <[email-masked]>
+;;; Copyright © 2021 David Larsson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1019,6 +1020,39 @@ recursive runs on the generated subnets.  (also IPv6)
 @end itemize\n")
     (license license:bsd-3)))
 
+(define-public prips
+  (package
+    (name "prips")
+    (version "1.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://devel.ringlet.net/files/sys/"
+                           name "/" name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1a33vbl4w603mk6mm5r3vhk87fy3dfk5wdpch0yd3ncbkg3fmvqn"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
+       #:test-target "test"
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'install
+                    (lambda _
+                      (let*
+                          ((bin-dir  (string-append %output "/bin"))
+                           (bin-file (string-append bin-dir "/prips")))
+                        (mkdir-p bin-dir)
+                        (copy-file "prips" bin-file)
+                        (chmod bin-file #o600)))))))
+    (native-inputs `(("perl-test-harness" ,perl-test-harness)))
+    (synopsis "Tool that prints the IP addresses in a given range")
+    (description "Prips can be used to print all of the IP addresses in
+ a given range.  This allows the enhancement of tools only work
+ on one host at a time (e.g. whois).")
+    (home-page "https://devel.ringlet.net/sysutils/prips/")
+    (license license:gpl2+)))
+
 (define-public alive
   (package
     (name "alive")
-- 
2.30.2