From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sander van der Burg - EWI Newsgroups: gmane.linux.distributions.nixos,gmane.lisp.guile.user,gmane.comp.gnu.system Subject: Re: [***SPAM***] [ANN] Guix, functional package management from Guile Date: Mon, 9 Jul 2012 08:50:48 +0000 Message-ID: <0C7505D30CB13C4EB6299DF976BF0B262C999B7D@SRV364.tudelft.net> References: <87bojrp76i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1341823858 8955 80.91.229.3 (9 Jul 2012 08:50:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2012 08:50:58 +0000 (UTC) To: =?Windows-1252?Q?Ludovic_Court=E8s?= , "guile-user@gnu.org" , "gnu-system-discuss@gnu.org" , nix-dev Original-X-From: nix-dev-bounces@lists.science.uu.nl Mon Jul 09 10:50:57 2012 Return-path: Envelope-to: gldn-nix-dev@m.gmane.org Original-Received: from science-vs10.science.uu.nl ([131.211.32.13] helo=mail.science.uu.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1So9gF-0007jd-MX for gldn-nix-dev@m.gmane.org; Mon, 09 Jul 2012 10:50:55 +0200 Original-Received: from mail.science.uu.nl (localhost.localdomain [127.0.0.1]) by mail.science.uu.nl (Postfix) with ESMTP id D02FC21858F; Mon, 9 Jul 2012 10:50:54 +0200 (CEST) Original-Received: from mail.science.uu.nl (localhost.localdomain [127.0.0.1]) by mail.science.uu.nl (Postfix) with ESMTP id ECCB521858F for ; Mon, 9 Jul 2012 10:50:52 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by mail.science.uu.nl (Postfix) with ESMTP id DB2EF21835B for ; Mon, 9 Jul 2012 10:50:52 +0200 (CEST) Original-Received: from mail.cs.uu.nl (dusk.cs.uu.nl [131.211.80.10]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q698opZb012728 for ; Mon, 9 Jul 2012 10:50:51 +0200 Original-Received: by mail.cs.uu.nl (Postfix) id 3AA49A3713; Mon, 9 Jul 2012 10:51:07 +0200 (CEST) Original-Received: from mail.cs.uu.nl (localhost.localdomain [127.0.0.1]) by mail.cs.uu.nl (Postfix) with ESMTP id 23BABA3719 for ; Mon, 9 Jul 2012 10:51:07 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.uu.nl (Postfix) with ESMTP id 14C83A3713 for ; Mon, 9 Jul 2012 10:51:07 +0200 (CEST) Original-Received: from mailservice.tudelft.nl (mailservice.tudelft.nl [130.161.131.5]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q698onte005780 for ; Mon, 9 Jul 2012 10:50:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by amavis (Postfix) with ESMTP id BA26A2B8006; Mon, 9 Jul 2012 10:50:49 +0200 (CEST) X-Virus-Scanned: amavisd-new at tudelft.nl X-Spam-Score: undef - 131.211.80.10 is whitelisted. X-Spam-Level: X-Spam-Status: No, score=-0.997 tagged_above=-99 required=5 tests=[BAYES_00=-1.9, PROLO_LEO5=0.01, RDNS_NONE=0.793, TUD_2010_4=0.1] autolearn=no Original-Received: from mailservice.tudelft.nl ([130.161.131.73]) by localhost (tudelft.nl [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tVYxZDXQ0tfN; Mon, 9 Jul 2012 10:50:48 +0200 (CEST) Original-Received: from srv352.tudelft.net (mailboxcluster2.tudelft.net [131.180.6.102]) by mx2.tudelft.nl (Postfix) with ESMTP id 7B8522B8002; Mon, 9 Jul 2012 10:50:48 +0200 (CEST) Original-Received: from SRV364.tudelft.net ([fe80::4871:54d0:30ed:9186]) by srv352.tudelft.net ([::1]) with mapi id 14.01.0339.001; Mon, 9 Jul 2012 10:50:48 +0200 Thread-Topic: [Nix-dev] [***SPAM***] [ANN] Guix, functional package management from Guile Thread-Index: AQHNXItdQr71HGh1jE6Le9xRXLZPR5cgpoh0 In-Reply-To: <87bojrp76i.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Bayes-Prob: 0.9999 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=131.211.80.10; country=NL; region=09; city=Utrecht; latitude=52.0938; longitude=5.1191; http://maps.google.com/maps?q=52.0938,5.1191&z=6 X-CanItPRO-Stream: uu:nix-dev@lists.science.uu.nl (inherits from uu:science, uu:default, base:default) X-Canit-Stats-ID: 0NHw8OPoh - 74a5f8912ee1 - 20120709 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-Scanned-By: CanIt (www . roaringpenguin . com) X-AV-Checked: ClamAV using ClamSMTP at cs.uu.nl X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: nix-dev@lists.science.uu.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: Nix developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: nix-dev-bounces@lists.science.uu.nl Errors-To: nix-dev-bounces@lists.science.uu.nl Xref: news.gmane.org gmane.linux.distributions.nixos:9114 gmane.lisp.guile.user:9523 gmane.comp.gnu.system:14 Archived-At: Awesome experiment Ludovic! Actually, I had some "crazy ideas" in the past as well. For example, to dev= elop an "internal DSL" for Nix in Scala (no specific reason why it's useful= , but oh well....) ________________________________________ From: nix-dev-bounces@lists.science.uu.nl [nix-dev-bounces@lists.science.uu= .nl] on behalf of Ludovic Court=E8s [ludo@gnu.org] Sent: Saturday, July 07, 2012 11:55 PM To: guile-user@gnu.org; gnu-system-discuss@gnu.org; nix-dev Subject: [Nix-dev] [***SPAM***] [ANN] Guix, functional package manageme= nt from Guile Hello! I am delighted to announce Guix, a purely functional package management tool. https://gitorious.org/guix http://www.fdn.fr/~lcourtes/software/guix-0.0.tar.gz SHA1: 30d99946c67e9a015bb9817b3731765aadc533be Guix is written in Guile Scheme. It builds on top of the low-level build and storage mechanisms of the Nix package manager[*], and provides high-level APIs to describe and run arbitrary build processes, and a declarative interface to describe and compose software packages. Guix implements purely functional package build and composition: a build process is a Scheme function that returns the path of its result in the =93store=94=96the /nix/store directory. The store acts as a build cache, subject to garbage collection. Changing a bit in the build process=92s inputs (dependencies, environment variables, etc.) changes the result. All the nifty features of Nix are inherited: =95 multiple versions or variants of packages can happily coexist; =95 the package build environment is under control, in a chroot, such that the result of a build process cannot be influenced by the outside world; =95 support for transactional upgrades and rollback; =95 per-user environments, non-root package installation; =95 etc. Last but not least, Guix comes with an actual distro! https://gitorious.org/guix/guix/blobs/master/distro/base.scm Granted, it has yet to grow ;-), but it showcases the main ideas: packages are described in a high-level, hopefully intelligible way, and their build scripts are written and customized in Scheme. Packages may be built with, say: guix-build guile or guix-build -e '(@ (distro base) guile-2.0)' The latter refers unambiguously to the variable bound to the package of interest, whereas the former would pick the first package of that name. The =91guile-reader=92 example in the above file shows package composition, while the =91lout=92 example shows that even hostile build systems can be accommodated. Guix & Nix ~~~~~~~~~~ Nix is really two things: a package build tool, implemented by a library and daemon, and a special-purpose programming language. Guix relies on the former, but uses Scheme as a replacement for the latter. Technically, Guix makes remote procedure calls to the =91nix-worker=92 daemon to perform operations on the store. At the lowest level, Nix =93derivations=94 represent promises of a build, stored in =91.drv=92 files= in the store. Guix produces such derivations, which are then interpreted by the daemon to perform the build. Thus, Guix derivations can use derivations produced by Nix (and vice versa); in Guix, the cheat code is the =91nixpkgs-derivation=92 procedure. :-) With Nix and the Nixpkgs distribution, package composition happens at the Nix language level, but builders are usually written in Bash. Conversely, Guix encourages the use of Scheme for both package composition and builders. Other noteworthy points: Guix doesn=92t yet have an equivalent to =91nix-env=92; it supports multiple-derivation outputs (where a build produces several files under /nix/store); package descriptions in the mini-distro are internationalized; the distribution being written in Scheme, it is compiled efficiently by Guile=92s compiler. Help needed! ~~~~~~~~~~~~ It seems to me like a lot more can be done with this, and it=92s fun! If you=92re a Nixer, you=92re welcome to give it a try (you just need a =91nix-worker=92 instance running), attempt to build/package something, and provide feedback on the API and declarative package expressions. If you=92re a Guiler, there are interesting challenges. One is to write more macros/EDSLs to provide builders with operations as high-level as typically found in shell scripts (for instance, =91substitute*=92 attempts to provide a sed-like API.) Another one is to investigate whether/how the code of builders could be generated hygienically (see =91build-expression->derivation=92.) If you=92re a GNU-system-discusser, feedback is welcome! How would it fit in a hypothetical GNU distribution? Happy hacking & packaging! Ludo=92. [*] http://nixos.org/nix/