From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Profiles/manifests-related command line interface enhancements Date: Wed, 23 Oct 2019 18:37:43 +0200 Message-ID: <87mudrxvs8.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNJdt-0006eF-9l for guix-devel@gnu.org; Wed, 23 Oct 2019 12:37:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNJdr-0003ws-Fg for guix-devel@gnu.org; Wed, 23 Oct 2019 12:37:48 -0400 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@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi! While playing with multiple profiles and manifests and discussing with a couple of people in the community, I collected a number of usability issues with Guix when it comes to managing multiple profiles and dealing with manifests. Ideas for new features, more or less from most important to least important: =2D Activate a profile with =3Dguix activate /path/to/profile=3D. Right now, the most appropriate way to activate a profile is =2D-8<---------------cut here---------------start------------->8--- GUIX_PROFILE=3D"$profile" ; . "$profile"/etc/profile =2D-8<---------------cut here---------------end--------------->8--- But this is flawed: it exposes implementation details plus it fails to set important variables like MANPATH or INFOPATH if man-db / info-reader or not installed in the said profile. See /etc/profile for the full list of what =3Dguix activate=3D should do. =2D The inverse command, =3Dguix deactivate /path/to/profile=3D. This can be useful to deactivate a profile that was activated during logi= n. =2D All commands that accept manifests should be able to compose manifests by passing multiple =3D--manifest FILE=3D options. =20=20 =2D Auto-update manifests when calling =3Dguix package -m manifest.scm -i foo -r bar=3D. This would make users more inclined to user manifests even for "quick and dirty" installs. See next point. This means we need to edit the code, but that's doable since the last form of manifest.scm must evaluate to a manifest. So we could proceed as follows: + If the last form is a spec, edit the list directly. + If not, then wrap the last form in the appropriate `manifest-add' / `manifest-remove' calls, e.g. =2D-8<---------------cut here---------------start------------->8--- (manifest-add "foo" (manifest-delete "bar" my-manifest)) =2D-8<---------------cut here---------------end--------------->8--- =2D Use a default manifest by default with =3Dguix install=3D and =3Dguix remove=3D. This way would basically get rid of "ad-hoc" profiles which has so many flaws (non-reproducible, non-trackable, etc.). Last, one that's at the Scheme level: =2D A Scheme function to create a manifest for the necessary inputs of a package, like =3Dguix environment PACKAGE=3D does. (Maybe it's already p= ossible?) Thoughts? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2wgdcACgkQm9z0l6S7 zH/2Xgf9H3std8iYmIRc0kkFjMqsCr8hjsngFs6YZhN7O1q/3qwf8SNtIgDHeakm pK3yad1x8GYt/LMyNVzgeBHV5UHzlMveNiVzbdM7oUecs24e7kUBVqanuWN+5IR0 jJewsyD3YbBXUjymtRs6TDUzgUbL6nFRStBXN6uUSZZKWKWijhmqQeMa2bY5V19I fMG6G9gcY9enUYvf2a9D5i4WH6/6dkQOpvISBXyFrf53l1EveIKwLg/QpnTeOW1N miB0EeYD2D5LrXHtrnAAR8rRHQUkbyNMvKlsGXYyhZn3SCKOQIM9Oje4aq/ZjnTd fylhUnpH7tBrzT/GJfHcls6sq7LCQg== =uoSm -----END PGP SIGNATURE----- --=-=-=--