guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

git guix checkout automation for contributors


From: Danny Milosavljevic
Subject: git guix checkout automation for contributors
Date: Sun, 25 Sep 2022 16:06:06 +0200

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: pgpVJssqmGZpn.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]