From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: new manifest format readers? Date: Fri, 09 Jun 2017 14:03:22 +0200 Message-ID: <87zidhcqr9.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJIdZ-0005qz-5k for guix-devel@gnu.org; Fri, 09 Jun 2017 08:03:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJIdU-0007XF-5t for guix-devel@gnu.org; Fri, 09 Jun 2017 08:03:33 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dJIdT-0007Ws-Uj for guix-devel@gnu.org; Fri, 09 Jun 2017 08:03:28 -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 Hi Guix, I received some feedback on the usability of Guix and one of the points I got was about manifests. For the simplest case, a user may just want to ask Guix to install a fixed set of packages at specified versions. Currently, doing this involves some boilerplate code. One can either write a manifest using variable names or convert a list of spec strings to a manifest. The latter case is used a lot at my institute and it’s unfortunate that this requires so much code (with emphasis on “code”, not on “so much”). Here’s an example: --8<---------------cut here---------------start------------->8--- (define packages (list "gfortran@5" "gcc-toolchain@5" "cdogs-sdl")) ;; Boilerplate code to turn the above list of packages into a manifest (use-modules (gnu packages)) (packages->manifest (map (compose list specification->package+output) packages)) --8<---------------cut here---------------end--------------->8--- It’s not bad, but when a person uses specification strings they really just care about the package names and versions. Can we simplify this case by adding manifest readers for different formats? One simple format could be plain text: --8<---------------cut here---------------start------------->8--- # this is for compilers gfortran@5 gcc-toolchain@5 # this is for fun cdogs-sdl --8<---------------cut here---------------end--------------->8--- The manifest reader would just discard # comments and interpret each non-empty line as a spec string. While I love Scheme, I don’t think anything is to be gained from exposing users who don’t want to use Scheme for manifests to opaque blobs of code and syntax they don’t want to understand. What do you think? -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net