Roel Janssen <r...@gnu.org> writes:

> Dear Guix,
>
> When installing ‘guix’ in a profile, the ‘bin’ directory of that profile
> contains:
>
> asn1Coding -> 
> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Coding
> asn1Decoding -> 
> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Decoding
> asn1Parser -> 
> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Parser
> certtool -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/certtool
> gnutls-cli -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli
> gnutls-cli-debug -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli-debug
> gnutls-serv -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-serv
> guix -> 
> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix
> guix-daemon -> 
> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix-daemon
> idn2 -> /gnu/store/ksyja5lbwy0mpskvn4rfi5klc00c092d-libidn2-2.0.4/bin/idn2
> nettle-hash -> 
> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-hash
> nettle-lfib-stream -> 
> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-lfib-stream
> nettle-pbkdf2 -> 
> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-pbkdf2
> ocsptool -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/ocsptool
> pkcs1-conv -> 
> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/pkcs1-conv
> psktool -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/psktool
> sexp-conv -> 
> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/sexp-conv
> srptool -> 
> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/srptool
> ssshd.scm -> 
> /gnu/store/g2k7v2wv9w2ybs1glwh42w55jq25zd4h-guile-ssh-0.11.2/bin/ssshd.scm
> sssh.scm -> 
> /gnu/store/g2k7v2wv9w2ybs1glwh42w55jq25zd4h-guile-ssh-0.11.2/bin/sssh.scm
>
> I suspect that the Scheme files don't belong in ‘bin’.  What about the
> others?  Can we do better here than propagate ‘gnutls’ and ‘nettle’?

I attached a patch that moves the ‘guile-ssh’ bin-items to its examples
directory.  Is that OK to push?

Kind regards,
Roel Janssen

>From 9455c7b94e0010ff4038132affc7a5c796313894 Mon Sep 17 00:00:00 2001
From: Roel Janssen <r...@gnu.org>
Date: Tue, 24 Apr 2018 12:48:32 +0200
Subject: [PATCH] gnu: guile-ssh: Move files from bin to examples directory.

* gnu/packages/ssh.scm (guile-ssh): Move files from bin to the examples
  directory.
---
 gnu/packages/ssh.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index afd41cd8e..e5702b9b7 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -259,8 +259,18 @@ Additionally, various channel-specific options can be negotiated.")
                              (substitute* (find-files "." "\\.scm$")
                                (("\"libguile-ssh\"")
                                 (string-append "\"" libdir "/libguile-ssh\"")))
-                             #t)))))
-
+                             #t))))
+                  (add-after 'install 'remove-bin-directory
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin"))
+                             (examples (string-append
+                                        out "/share/guile-ssh/examples")))
+                        (mkdir-p examples)
+                        (invoke "mv" (string-append bin "/ssshd.scm") examples)
+                        (invoke "mv" (string-append bin "/sssh.scm") examples)
+                        (delete-file-recursively bin)
+                        #t))))
        ;; Tests are not parallel-safe.
        #:parallel-tests? #f))
     (native-inputs `(("autoconf" ,autoconf)
-- 
2.17.0

Reply via email to