unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: david larsson <david.larsson@selfhosted.xyz>
Cc: 47540-done@debbugs.gnu.org, Maxime Devos <maximedevos@telenet.be>
Subject: bug#47540: [PATCH] gnu: Add prips.
Date: Mon, 12 Apr 2021 12:47:41 +0200	[thread overview]
Message-ID: <87h7kbrd82.fsf_-_@gnu.org> (raw)
In-Reply-To: <444cc65de656858b59e577dce74009bb@selfhosted.xyz> (david larsson's message of "Thu, 08 Apr 2021 21:28:59 +0200")

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

Hi,

david larsson <david.larsson@selfhosted.xyz> skribis:

> From 85cf7b9d22801d9b3bac8956b358fce4c32dcb4c Mon Sep 17 00:00:00 2001
> From: methuselah-0 <david.larsson@selfhosted.xyz>
> Date: Thu, 8 Apr 2021 21:26:23 +0200
> Subject: [PATCH] gnu: Add prips.
>
> gnu/packages/admin.scm (prips): New variable.

[...]

> +                  (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)))))))

That installed a non-executable file.  I fixed this with the patch
below, which also make the style more consistent.

Thanks David, and thanks Maxime for the review!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1166 bytes --]

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index f3e8774b75..512ac320e6 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1070,13 +1070,10 @@ recursive runs on the generated subnets.  (also IPv6)
        #: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)))))))
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (install-file "prips"
+                                      (string-append out "/bin"))))))))
     (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

      reply	other threads:[~2021-04-12 10:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 13:11 [bug#47540] [PATCH] gnu: Add prips david larsson
2021-04-01 19:44 ` Maxime Devos
2021-04-05 13:09   ` david larsson
2021-04-05 17:38     ` david larsson
2021-04-06 14:04       ` Maxime Devos
2021-04-08 19:28         ` david larsson
2021-04-12 10:47           ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7kbrd82.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=47540-done@debbugs.gnu.org \
    --cc=david.larsson@selfhosted.xyz \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).