Message ID | 49559efd0d392df29393ac7441b83f14c2840b21.1646484354.git.simon@simonsouth.net |
---|---|
State | Accepted |
Headers | show |
Series | gnu: ucsim: Update to 0.7.1. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Simon South schreef op za 05-03-2022 om 07:59 [-0500]: > (add-after 'install 'remove-empty-directory > (lambda* (#:key outputs #:allow-other-keys) > (delete-file-recursively > - (string-append (assoc-ref outputs "out") "/share/man")) > - #t))))) > + (string-append (assoc-ref outputs "out") "/share/man"))))))) Additionally, you could make the #:configure-flags a G-exp and eliminate input labels (or, in this case, output labels): (list #:phases #~(modify-phases ... (add-after ... ... (lambda _ ... (string-append #$output "/share/man") ...)))) Greetings, Maxime.
Maxime Devos <maximedevos@telenet.be> writes: > Additionally, you could make the #:configure-flags a G-exp and > eliminate input labels (or, in this case, output labels) This occurred to me, but is it not better in this case to rely on the "output" parameter passed into the procedure? Using "#$output" in this context feels like a violation of the Law of Demeter, like using a global variable where a local one would be appropriate. I'll drop the first patch though; I'd missed seeing the definition of "gnu-cross-build".
Simon South schreef op za 05-03-2022 om 11:39 [-0500]: > This occurred to me, but is it not better in this case to rely on the > "output" parameter passed into the procedure? Using "#$output" in this > context feels like a violation of the Law of Demeter, like using a > global variable where a local one would be appropriate. 'outputs' is an argument to the phase procedure, but as I understand it, it is only due to historical reasons (G-exps are relatively new- ish) and because the procedures in (guix build FOO-build-system) have no other method for determining the outputs. Might be a good idea to confirm with chief gexpologist ludo though. Greetings, Maxime.
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 43fba510da..1d232e471a 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -1507,13 +1507,11 @@ (define-public ucsim (add-after 'unpack 'patch-makefiles (lambda _ (substitute* (find-files "." "(\\.mk$|\\.in$)") - (("/bin/sh") (which "sh"))) - #t)) + (("/bin/sh") (which "sh"))))) (add-after 'install 'remove-empty-directory (lambda* (#:key outputs #:allow-other-keys) (delete-file-recursively - (string-append (assoc-ref outputs "out") "/share/man")) - #t))))) + (string-append (assoc-ref outputs "out") "/share/man"))))))) (native-inputs (list bison flex)) (home-page "http://mazsola.iit.uni-miskolc.hu/ucsim/")