Message ID | 4b06f0dfd85371124b806db9a62e37def770d846.1696014292.git.liliana.prikler@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bug#66270,v2] gnu: mpd-mpc: Install bash completions in correct location. | expand |
Hi Liliana, On Fri, 29 Sep 2023 at 20:45, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote: > * gnu/packages/mpd.scm (mpd-mpc)[#:phases]: Add ‘move-completion’. > + (add-after 'install 'move-completion LGTM. I would use ’install-completion’ instead. Yeah, cosmetic nitpicking about bikeshedding because I haven’t had enough coffee today. ;-) Cheers, simon
Am Mittwoch, dem 04.10.2023 um 12:02 +0200 schrieb Simon Tournier: > Hi Liliana, > > On Fri, 29 Sep 2023 at 20:45, Liliana Marie Prikler > <liliana.prikler@gmail.com> wrote: > > * gnu/packages/mpd.scm (mpd-mpc)[#:phases]: Add ‘move-completion’. > > > + (add-after 'install 'move-completion > > LGTM. I would use ’install-completion’ instead. Yeah, cosmetic > nitpicking about bikeshedding because I haven’t had enough coffee > today. ;-) It's not installing it, though – merely moving it from one place in output, to another (the one that's actually consulted by bash). Hence, move. Cheers
Hi, On Wed, 04 Oct 2023 at 20:51, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote: > It's not installing it, though – merely moving it from one place in > output, to another (the one that's actually consulted by bash). Hence, > move. That’s the definition of “installing files”, no? :-) --8<---------------cut here---------------start------------->8--- INSTALL(1) User Commands INSTALL(1) NAME install - copy files and set attributes DESCRIPTION This install program copies files (often just compiled) into destina‐ tion locations you choose. --8<---------------cut here---------------end--------------->8--- Anyway. I had my coffee now, so no more bikeshed between “copy” vs “move”, which is in this context the same. ;-) Cheers, simon
Am Donnerstag, dem 05.10.2023 um 17:06 +0200 schrieb Simon Tournier: > Hi, > > On Wed, 04 Oct 2023 at 20:51, Liliana Marie Prikler > <liliana.prikler@gmail.com> wrote: > > > It's not installing it, though – merely moving it from one place in > > output, to another (the one that's actually consulted by bash). > > Hence, move. > > That’s the definition of “installing files”, no? :-) > > --8<---------------cut here---------------start------------->8--- > INSTALL(1) User Commands INSTALL(1) > > NAME > install - copy files and set attributes > > DESCRIPTION > This install program copies files (often just compiled) into > destination locations you choose. > --8<---------------cut here---------------end--------------->8--- > > Anyway. I had my coffee now, so no more bikeshed between “copy” vs > “move”, which is in this context the same. ;-) On a high level, copying means that (a copy of) the file persists in its previous location, whereas move means it does not. The 'move- convention is used for files that are placed by the build system in some output location, that we actually want to have in a different output location. Cheers
Am Freitag, dem 06.10.2023 um 10:59 +0200 schrieb Liliana Marie Prikler: > Am Donnerstag, dem 05.10.2023 um 17:06 +0200 schrieb Simon Tournier: > > Hi, > > > > On Wed, 04 Oct 2023 at 20:51, Liliana Marie Prikler > > <liliana.prikler@gmail.com> wrote: > > > > > It's not installing it, though – merely moving it from one place > > > in > > > output, to another (the one that's actually consulted by bash). > > > Hence, move. > > > > That’s the definition of “installing files”, no? :-) > > > > --8<---------------cut here---------------start------------->8--- > > INSTALL(1) User Commands > > INSTALL(1) > > > > NAME > > install - copy files and set attributes > > > > DESCRIPTION > > This install program copies files (often just compiled) > > into > > destination locations you choose. > > --8<---------------cut here---------------end--------------->8--- > > > > Anyway. I had my coffee now, so no more bikeshed between “copy” vs > > “move”, which is in this context the same. ;-) > On a high level, copying means that (a copy of) the file persists in > its previous location, whereas move means it does not. […] Pushed now. Cheers
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm index d617dc014b..8ce9eb4228 100644 --- a/gnu/packages/mpd.scm +++ b/gnu/packages/mpd.scm @@ -246,7 +246,16 @@ (define-public mpd-mpc ;; actually invoked. (lambda _ (substitute* "doc/meson.build" - (("rsync") "ls"))))))) + (("rsync") "ls")))) + (add-after 'install 'move-completion + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (contrib (string-append out "/share/doc/mpc/contrib")) + (completion + (string-append out "/etc/bash-completion.d/"))) + (mkdir-p completion) + (rename-file (string-append contrib "/mpc-completion.bash") + (string-append completion "/mpc")))))))) (inputs (list libmpdclient)) (native-inputs (list pkg-config python-sphinx))