* Am I doing it all wrong? @ 2022-08-27 15:34 jgart 2022-08-27 17:15 ` Ricardo Wurmus ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: jgart @ 2022-08-27 15:34 UTC (permalink / raw) To: Guix Help Hi, This is what I do to work on GNU Guix on a foreign distro: git clone https://git.savannah.gnu.org/git/guix.git cd guix guix shell -D guix --container -- ./bootstrap guix shell -D guix --container -- ./configure --localstatedir=/var guix shell -D guix --container -- make guix shell --container --network coreutils vis ripgrep rlwrap -D guix --share=/var/guix/ Should I be doing anything differently in the above for setting up a dev environment for guix hacking? -- jgart ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 15:34 Am I doing it all wrong? jgart @ 2022-08-27 17:15 ` Ricardo Wurmus 2022-08-27 18:38 ` jgart 2022-08-27 20:45 ` ( 2022-08-28 11:52 ` Csepp 2 siblings, 1 reply; 11+ messages in thread From: Ricardo Wurmus @ 2022-08-27 17:15 UTC (permalink / raw) To: jgart; +Cc: help-guix jgart <jgart@dismail.de> writes: > Hi, > > This is what I do to work on GNU Guix on a foreign distro: > > git clone https://git.savannah.gnu.org/git/guix.git > > cd guix > guix shell -D guix --container -- ./bootstrap > guix shell -D guix --container -- ./configure --localstatedir=/var > guix shell -D guix --container -- make > guix shell --container --network coreutils vis ripgrep rlwrap -D guix --share=/var/guix/ > > Should I be doing anything differently in the above for setting up a dev environment for guix hacking? Why do you keep exiting and entering the container for each command? And: why use a container at all when “guix shell --pure” would be more than enough? I’d just start a new shell *once* and then run the commands inside of the shell session. -- Ricardo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 17:15 ` Ricardo Wurmus @ 2022-08-27 18:38 ` jgart 2022-08-27 20:53 ` ( 2022-08-27 20:56 ` ( 0 siblings, 2 replies; 11+ messages in thread From: jgart @ 2022-08-27 18:38 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: help-guix On Sat, 27 Aug 2022 19:15:24 +0200 Ricardo Wurmus <rekado@elephly.net> wrote: > Why do you keep exiting and entering the container for each command? I agree. I think I had some issue iirc trying to run them all in one command with && > And: why use a container at all when “guix shell --pure” would be more > than enough? Because I'm running Guix on void linux and here be dragons I don't yet understand. > I’d just start a new shell *once* and then run the commands inside of > the shell session. I was running the above commands as part of this shell script: https://git.sr.ht/~whereiseveryone/dot/tree/master/item/bin/executable_guix-prepare-tree Thanks for the feedback. Much appreciated! -- jgart ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 18:38 ` jgart @ 2022-08-27 20:53 ` ( 2022-08-27 20:56 ` ( 1 sibling, 0 replies; 11+ messages in thread From: ( @ 2022-08-27 20:53 UTC (permalink / raw) To: jgart, Ricardo Wurmus; +Cc: help-guix On Sat Aug 27, 2022 at 7:38 PM BST, jgart wrote: > I agree. I think I had some issue iirc trying to run them all in one command with && Perhaps: guix shell -D guix --pure -- sh -c "./bootstrap && ./configure --localstatedir=/var && make -j$(nproc)" -- ( ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 18:38 ` jgart 2022-08-27 20:53 ` ( @ 2022-08-27 20:56 ` ( 2022-08-27 20:58 ` ( 1 sibling, 1 reply; 11+ messages in thread From: ( @ 2022-08-27 20:56 UTC (permalink / raw) To: jgart, Ricardo Wurmus; +Cc: help-guix On Sat Aug 27, 2022 at 7:38 PM BST, jgart wrote: > I agree. I think I had some issue iirc trying to run them all in one command with && Or maybe... guix shell -D guix -- sh <<EOF ./bootstrap && ./configure --localstatedir=/var && make -j$(nproc) EOF -- ( ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 20:56 ` ( @ 2022-08-27 20:58 ` ( 2022-08-28 11:50 ` Csepp 0 siblings, 1 reply; 11+ messages in thread From: ( @ 2022-08-27 20:58 UTC (permalink / raw) To: (, jgart, Ricardo Wurmus; +Cc: help-guix On Sat Aug 27, 2022 at 9:56 PM BST, ( wrote: > guix shell -D guix -- sh <<EOF > ./bootstrap && ./configure --localstatedir=/var && make -j$(nproc) > EOF You could wrap it in a sh function: gsh() { guix shell $@ -- sh } gsh -D guix <<EOF ./bootstrap && ./configure --localstatedir=/var && make -j$(nproc) EOF -- ( ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 20:58 ` ( @ 2022-08-28 11:50 ` Csepp 2022-08-28 12:21 ` ( 0 siblings, 1 reply; 11+ messages in thread From: Csepp @ 2022-08-28 11:50 UTC (permalink / raw) To: (; +Cc: jgart, Ricardo Wurmus, help-guix "(" <paren@disroot.org> writes: > On Sat Aug 27, 2022 at 9:56 PM BST, ( wrote: >> guix shell -D guix -- sh <<EOF >> ./bootstrap && ./configure --localstatedir=/var && make -j$(nproc) >> EOF > > You could wrap it in a sh function: > > gsh() { > guix shell $@ -- sh > } > > gsh -D guix <<EOF > ./bootstrap && ./configure --localstatedir=/var && make -j$(nproc) > EOF > > -- ( Did you test that one? Because I'm pretty sure it won't work, you aren't passing the heredoc file descriptor to sh but guix shell. Also, that should probably be "$@", just in case. Because Bash is garbage. :) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-28 11:50 ` Csepp @ 2022-08-28 12:21 ` ( 2022-08-28 14:10 ` Saku Laesvuori 0 siblings, 1 reply; 11+ messages in thread From: ( @ 2022-08-28 12:21 UTC (permalink / raw) To: Csepp; +Cc: jgart, Ricardo Wurmus, help-guix On Sun Aug 28, 2022 at 12:50 PM BST, Csepp wrote: > Did you test that one? Because I'm pretty sure it won't work, you > aren't passing the heredoc file descriptor to sh but guix shell. I hadn't tested it then, but I just did now, and it works. gsh -D guix lua <<EOF echo "hello" lua -e 'print "hello"' guile -c '(display "hello") (newline)' EOF hello hello hello > Also, that should probably be "$@", just in case. I don't think it'll make any difference; if, say, "foo" "bar" "baz" is passed, both $@ and "$@" will expand to "foo" "bar" "baz" (yes, bypassing the quotes). According to POSIX.1-2017's specification of `sh`: When the expansion occurs within double-quotes, the behavior is unspecified unless one of the following is true: + Field splitting [...] would be performed if the expansion were not within double-quotes [...]. + [...] So, $@ == "$@". > Because Bash is garbage. :) I can't disagree on that one. :) -- ( ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-28 12:21 ` ( @ 2022-08-28 14:10 ` Saku Laesvuori 0 siblings, 0 replies; 11+ messages in thread From: Saku Laesvuori @ 2022-08-28 14:10 UTC (permalink / raw) To: (; +Cc: Csepp, jgart, Ricardo Wurmus, help-guix [-- Attachment #1: Type: text/plain, Size: 760 bytes --] > > Also, that should probably be "$@", just in case. > > I don't think it'll make any difference; if, say, "foo" "bar" "baz" is > passed, both $@ and "$@" will expand to "foo" "bar" "baz" (yes, bypassing > the quotes). > > According to POSIX.1-2017's specification of `sh`: > > When the expansion occurs within double-quotes, the behavior is unspecified > unless one of the following is true: > > + Field splitting [...] would be performed if the expansion were not within > double-quotes [...]. > > + [...] > > So, $@ == "$@". It does actually make a difference if the arguments have spaces. Given arguments "foo" and "foo bar", $@ expands to "foo" "foo" "bar" and "$@" expands to "foo" "foo bar". - Saku Laesvuori [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 15:34 Am I doing it all wrong? jgart 2022-08-27 17:15 ` Ricardo Wurmus @ 2022-08-27 20:45 ` ( 2022-08-28 11:52 ` Csepp 2 siblings, 0 replies; 11+ messages in thread From: ( @ 2022-08-27 20:45 UTC (permalink / raw) To: jgart, Guix Help Hello jgart, On Sat Aug 27, 2022 at 4:34 PM BST, jgart wrote: > guix shell -D guix --container -- make You can use `make -j$(nproc)` to make the build *much* faster. -- ( ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Am I doing it all wrong? 2022-08-27 15:34 Am I doing it all wrong? jgart 2022-08-27 17:15 ` Ricardo Wurmus 2022-08-27 20:45 ` ( @ 2022-08-28 11:52 ` Csepp 2 siblings, 0 replies; 11+ messages in thread From: Csepp @ 2022-08-28 11:52 UTC (permalink / raw) To: jgart; +Cc: help-guix jgart <jgart@dismail.de> writes: > Hi, > > This is what I do to work on GNU Guix on a foreign distro: > > git clone https://git.savannah.gnu.org/git/guix.git > > cd guix > guix shell -D guix --container -- ./bootstrap > guix shell -D guix --container -- ./configure --localstatedir=/var > guix shell -D guix --container -- make > guix shell --container --network coreutils vis ripgrep rlwrap -D guix --share=/var/guix/ > > Should I be doing anything differently in the above for setting up a dev environment for guix hacking? You probably want to invoke ./configure like so: ./configure --sysconfdir=/etc/ --localstatedir=/var/ Otherwise if you reconfigure the system from the local checkout you will run into some "fun" behaviour. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-08-28 14:11 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-27 15:34 Am I doing it all wrong? jgart 2022-08-27 17:15 ` Ricardo Wurmus 2022-08-27 18:38 ` jgart 2022-08-27 20:53 ` ( 2022-08-27 20:56 ` ( 2022-08-27 20:58 ` ( 2022-08-28 11:50 ` Csepp 2022-08-28 12:21 ` ( 2022-08-28 14:10 ` Saku Laesvuori 2022-08-27 20:45 ` ( 2022-08-28 11:52 ` Csepp
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).