From: Danny Milosavljevic <dannym@scratchpost.org>
To: Guix-devel <guix-devel@gnu.org>
Subject: git guix checkout automation for contributors
Date: Sun, 25 Sep 2022 16:06:06 +0200 [thread overview]
Message-ID: <20220925160606.46d2e939@scratchpost.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2076 bytes --]
Hi,
So there were some comments on https://news.ycombinator.com/item?id=32960308
about getting started with contributing to Guix.
It turns out that the barrier of entry for editing existing packages is
kinda high (I tried it myself--putting myself into the mindset of a
beginner).
For example:
(1) Install the guix system
(2) Log in as regular user
(3) guix edit nano
(4) It opens a file from /gnu/store that you cannot edit.
Uhh. That's... not ideal. Maybe instead error out with a hint on what you need
to do in order to provide a local checkout? Or do we want viewing to work?
Ok, so let's say we are a little more knowledgeable:
(1) Install the guix system
(2) Log in as regular user
(3a) if [ ! -d src ]
then
mkdir src
cd src
else
cd src
fi \
&& if [ ! -d guix ]
then
git clone --depth=1 https://git.savannah.gnu.org/git/guix.git guix
else
(cd guix && git pull --rebase)
fi \
&& cd guix \
&& guix shell -C -D guix -- ./bootstrap \
&& guix shell -C -D guix -- ./configure --localstatedir=/var --disable-daemon \
&& guix shell -C -D guix -- make -j5 \ <--- takes forever to build
&& ./pre-inst-env guix edit nano \
&& git add gnu/packages/*.scm
Ok, that worked.
But there are a lot of ways that can be done wrong.
Weird way it can be done wrong:
(1) install the guix system
(2) log in as regular user
(3b) git clone --depth=1 https://git.savannah.gnu.org/git/guix.git guix \
&& cd guix \
&& guix shell -C -D guix -- ./bootstrap \
&& guix shell -C -D guix -- ./configure --localstatedir=/var --disable-daemon \
&& ./pre-inst-env guix edit nano
It will open the file in /gnu/store . WTF? I'm pretty sure that that's a bug.
./pre-inst-env does exist--but it does some weird things if you don't
compile beforehand.
Also, can we put a variant of (3a) into a command "guix prepare-edit" or
something?
It has always bothered me how manual and magical-commandy it is otherwise
(what you actually need to do also changed over the years--not good).
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2022-09-25 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-25 14:06 Danny Milosavljevic [this message]
2022-09-25 15:04 ` git guix checkout automation for contributors Danny Milosavljevic
2022-09-25 16:36 ` Maxime Devos
2022-10-01 17:18 ` Ludovic Courtès
2022-10-05 3:18 ` Maxim Cournoyer
2022-11-02 18:41 ` zimoun
[not found] <mailman.14689.1664114844.1079.guix-devel@gnu.org>
2022-09-25 21:40 ` kiasoc5
2022-09-26 10:55 ` zimoun
2022-09-26 20:37 ` Josselin Poiret
2022-09-27 8:38 ` zimoun
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=20220925160606.46d2e939@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=guix-devel@gnu.org \
/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).