From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: Re: Want help with writing package recipe Date: Fri, 07 Mar 2014 13:41:27 +0400 Message-ID: <87iorqwdko.fsf@karetnikov.org> References: <5318FED3.8060305@purdue.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLrAt-0007j7-F9 for guix-devel@gnu.org; Fri, 07 Mar 2014 04:34:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLrAs-0007GB-8i for guix-devel@gnu.org; Fri, 07 Mar 2014 04:34:39 -0500 Received: from [2a01:7e00::f03c:91ff:fedf:181] (port=51351 helo=cooksoni.karetnikov.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLrAr-0007G4-VM for guix-devel@gnu.org; Fri, 07 Mar 2014 04:34:38 -0500 In-Reply-To: <5318FED3.8060305@purdue.edu> (Joshua Branson's message of "Thu, 06 Mar 2014 18:03:47 -0500") 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: Joshua Branson Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > I used guix hash -f base32 to export the base32 hash, which is: > i5q225g6twsg5egicgpt6ub7hn4m7pdzg56hwxx57jm4o4ns5fgq You need =E2=80=98nix-base32=E2=80=99, which is the default format, so use = =E2=80=98guix hash=E2=80=99. > I've written a recipe for gtypist located here: > http://pastebin.com/ysLHJUWg Please include everything in the message body. Otherwise, some information may get lost in the future. > (use-modules (guix packages) > (guix download) > (guix build-system gnu) > (guix licenses)) You must use =E2=80=98define-module=E2=80=99 instead. See the recipes under =E2=80=98gnu/packages=E2=80=99 in the source tree, e.g., =E2=80=98wget.scm= =E2=80=99. > (define gtypist Guix can=E2=80=99t access the definition if it=E2=80=99s not public, so sub= stitute the above with =E2=80=98define-public=E2=80=99. > (package > (name "gtypist") > (version "2.9.4") > (source (origin > (method url-fetch) > (uri (string-append "mirror://gnu/gtypist-" version > ".tar.gz")) > (sha256 > (base32 "i5q225g6twsg5egicgpt6ub7hn4m7pdzg56hwxx57jm4o4ns5f= gq")))) Don=E2=80=99t forget to recompute the hash. > (build-system gnu-build-system) > (inputs `(("perl" ,perl))) > (inputs `(("ncurses" ,ncurses))) No need for two =E2=80=98input=E2=80=99 fields here. See the definition of= =E2=80=98coreutils=E2=80=99 in =E2=80=98gnu/packages/base.scm=E2=80=99 for an example. > (synopsis "GNU Typist") > (description "The official GNU software to help improve your typing.") > (home-page "http://www.gnu.org/software/gtypist/") Make sure to run =E2=80=98make sync-descriptions=E2=80=99 to check the abov= e. Use the proposed synopsis and description. > (license gpl3+))) > But now, I'm stuck. I'm not sure how to tell guix to run the > recipe. Guix's documentation says that the command "guix build options > package-or-derivation" > will build the package into a binary that I can run on my > machine. I can't say "guix build gtypist", because guix does not > currently have a recipe to build gtypist, and I can't say "guix > build options /path/to/gtypist.dri", because there is not a derivation > file on my machine for gtypist. Put the code in a file, say, =E2=80=98gnu/packages/gtypist.scm=E2=80=99. T= hen, run =E2=80=98guix build -K gtypist=E2=80=99 in order to build it. If any error= s occur, try to get some hints by running (from the root of your guix directory) $ ./pre-inst-env guile scheme@(guile-user)> ,use (gnu packages gtypist) > How do I submit a patch when I get it working? See the =E2=80=9CSubmitting Patches=E2=80=9D section in =E2=80=98HACKING=E2= =80=99. Basically, you add the needed files with =E2=80=98git add=E2=80=99, commit them with =E2=80=98= git commit=E2=80=99, and produce the patch with =E2=80=98git format-patch=E2=80=99. After that you = send the patch to the list. Your patch should look similar to this one [1]. Also, there is a packaging tutorial [2]. [1] http://git.savannah.gnu.org/cgit/guix.git/commit/?id=3Dece262461625e809= 57d904f39a6818286099d367 [2] https://gnu.org/software/guix/guix-ghm-andreas-20130823.pdf --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJTGZRJAAoJEM+IQzI9IQ38HO8P/jMkIprs71gAY2am0zjMThuS IlNzkZgJMv24QDJiyVdz1SB7k5l4jFjdAzy5Xt55VaI8DylUx6fTZPwvC8USs0YQ 7WYqTFWDGdNDEn/UMuzbLVT12jglMZHzDKqAjJe+XrRGkQDnyYeHQeqbSFTfnJK7 Hxq4wYzu8dNNHtu1fXdgJY6tfBX81IiGSXrEIPpPzVPrc/iIJxAdZQ9pQINK+3l9 ladw3gMUzYnIf2WUZJMLZTkDw235ewu7TpRHyUmNy7m5bX8eD3nNODI6cI8RzkUu r0p12gRvIIZenc+WuR/xA91WIuWERa12qm/oVcfLmeEs+snf07kAACS0nlgd0XOs hsmcsYzAR3FwowZ4XWs04XyQnHuYYNTMmK4TFmOxH6coHbS/F9E1eFvMEgspU+m+ EAie1J9hSYN4Wka8BEufej1u2zHYizTBLXEWnElq40n/SjbRu9s2c97SdlO9PbZA UWPOgPJwSr5dxth9aeui2l4HkhSkQCjyq95MbFAaL2zuTERO2aeEx6XLy2OhHpKO tLRZQb8v4JeW9uzrq3FHzhTAt9ZHAUtgt6WBY/ftYtsKqgE/1qq4A0PCfbd+vwev sl3eHegdjlLIeRwvXerSJFpywFw3TCFp0MikqxIwneK/ORRC6EpfOtsZ2LBSvrQC d4kxsVwdJf5lNohsNdJD =37tS -----END PGP SIGNATURE----- --=-=-=--