From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: A simple workflow for adding apps guix Date: Sun, 16 Apr 2017 20:21:33 +0200 Message-ID: <87zifgkyc2.fsf@fastmail.com> References: <87fuh9dy2p.fsf@163.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czont-00008F-7t for guix-devel@gnu.org; Sun, 16 Apr 2017 14:21:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czonp-0002Yn-UI for guix-devel@gnu.org; Sun, 16 Apr 2017 14:21:41 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43981) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1czonp-0002Vd-9R for guix-devel@gnu.org; Sun, 16 Apr 2017 14:21:37 -0400 In-Reply-To: <87fuh9dy2p.fsf@163.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel Cc: Feng Shu --=-=-= Content-Type: text/plain Feng Shu writes: > The below is the workflow I used current, any other > simpler workflow exists? comments are welcome! Hello! If you intend to submit these packages, I would recommend working directly from the main git repository rather than messing with GUIX_PACKAGE_PATH. Have a look at the "Running Guix before it is installed" section in the manual: https://www.gnu.org/software/guix/manual/guix.html#Running-Guix-Before-It-Is-Installed There is a 'pre-inst-env' script that makes testing local changes easy. Here is my typical workflow (motley gear optional): # Start with a clean master branch. $ git checkout master $ git pull # sometimes "--rebase" or simply `git reset --hard`.. # Create environment with all Guix dependencies. $ ge guix # "ge" is an alias for `guix environment`... # If this is a new machine, prepare the sources for this environment. $ ./bootstrap $ ./configure --localstatedir=/var # Now compile everything. This is typically done after each `pull`. $ make -j10 # Phew! Now let's start working on our package. $ git checkout -b package-foo $ ./pre-inst-env guix build foo # installing works too # It builds! Let's commit it. $ git add -p $ git commit # D'oh! Something was not right. $ ./pre-inst-env guix edit foo # I don't actually use this, but.. $ ./pre-inst-env guix build foo # Great, this looks better. $ git add -p $ git commit --amend # or --fixup= for later rebasing.. # Allright, now we can submit it! $ mkdir outgoing # Not really necessary, but easier to "clean". $ git format-patch --cover-letter -n origin/master -o outgoing/ $ edit outgoing/0000-cover-letter.patch # Cover letter can be omitted, but is a good way to give some background # info, raise questions, etc. Now, let's send it to open a bug report. $ git send-email --to guix-patches@gnu.org outgoing/0000-cover-letter.patch # Now we have a bug URL! Let's send the remainder there. $ rm outgoing/0000-cover-letter.patch $ git send-email --to NNNNN@debbugs.gnu.org outgoing/*.patch You can also make ~/.config/guix/latest a soft link to your git checkout and largely avoid the need for `./pre-inst-env`. I don't actually do that on my main development machine, since I need the `guix` command to always work, and my work tree is rarely "sane" :P instead, I manage my entire profile through `./pre-inst-env` and run `guix pull` once per week or so. I've been meaning to try git-worktree(1) instead. Hope it helps! Always interesting to see other workflows :) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljzti0ACgkQoqBt8qM6 VPoEwQf/fuBeCHMeE6qxybF/oGBj0iX7jvG4ldk+cwG2MxztkfW6kj/h6Oc4ifom dJx0FAQLkj5vgrb6S3V+uszujbhiQIkWpK4ZB/ubai/y+9GaAgIHqytBfmsbjp00 UQR+uWXmvtwAtooGJehnmwGk4J902CrUP3Lp0qTm7k5UlzVY5pPLbx7vpzFQ1kMw B6PciKGJH+qjtDozz0Md/aNJN0Zfxafmj31uamnOw3LoJ4Y2kcHOHqFjGArOrcsC 8EI8DhwnGzUcRdj1pp3YiB5AvemnHbN4g/08358rPXFRbwQsvJbm45QdCxIo3RWO EBuHzfMhEbuR5IVl/BciOT6ol27Bng== =9tS+ -----END PGP SIGNATURE----- --=-=-=--