From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] scripts: package: Add --install-from-file option. Date: Mon, 10 Aug 2015 17:22:50 +0300 Message-ID: <87egjbz0hx.fsf@gmail.com> References: <8737zs78rs.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOnyj-00039W-QX for guix-devel@gnu.org; Mon, 10 Aug 2015 10:23:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOnyd-0001I1-WF for guix-devel@gnu.org; Mon, 10 Aug 2015 10:23:05 -0400 Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:34181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOnyd-0001Hx-OO for guix-devel@gnu.org; Mon, 10 Aug 2015 10:22:59 -0400 Received: by labd1 with SMTP id d1so40871910lab.1 for ; Mon, 10 Aug 2015 07:22:58 -0700 (PDT) In-Reply-To: <8737zs78rs.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sun, 09 Aug 2015 11:59:19 -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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org David Thompson (2015-08-09 18:59 +0300) wrote: > In my personal projects, I keep a 'package.scm' file in the root of the > source tree for use with 'guix environment -l'. However, it's also > handy to install that package by using 'guix package -e': > > guix package -e '(primitive-load "package.scm")' > > This patch adds a shorthand for this: > > guix package -f package.scm > > The motivation for this is to ultimately encourage other people to keep > a 'package.scm' file in their own repos for building reproducible > development environments and easily testing development snapshots, like > what we do with our 'guix-devel' package. > > I'd like to add the same option for 'guix build', if this is approved. I agree that it will be easy for users than -e option. And I'm also for adding --from-file option to 'guix build'. Thank you. [...] > +@example > +(use-modules (guix packages) > + (guix download) > + (guix build-system gnu) > + (guix licenses)) (gnu packages gawk) module should also be put there, as the package uses 'gawk' input. > +(package > + (name "hello") > + (version "2.8") > + (source (origin > + (method url-fetch) > + (uri (string-append "mirror://gnu/hello/hello-" version > + ".tar.gz")) > + (sha256 > + (base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6")))) > + (build-system gnu-build-system) > + (arguments `(#:configure-flags '("--enable-silent-rules"))) > + (inputs `(("gawk" ,gawk))) > + (synopsis "Hello, GNU world: An example GNU package") > + (description "Guess what GNU Hello prints!") > + (home-page "http://www.gnu.org/software/hello/") > + (license gpl3+)) > +@end example -- Alex