From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Package Definitions and Maintenance Date: Mon, 03 Apr 2017 15:21:16 +0200 Message-ID: <87vaqlmxtf.fsf@gnu.org> References: <20170402114445.33e505b3@hitpoints> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv1vA-000609-4d for help-guix@gnu.org; Mon, 03 Apr 2017 09:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cv1v6-0001r8-7Z for help-guix@gnu.org; Mon, 03 Apr 2017 09:21:24 -0400 In-Reply-To: <20170402114445.33e505b3@hitpoints> (Thomas Sigurdsen's message of "Sun, 2 Apr 2017 11:44:45 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Thomas Sigurdsen Cc: "help-guix@gnu.org" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! Thomas Sigurdsen skribis: > I've been playing around with guixsd on my day-to-day work laptop for a m= onth > or so now and have to say I'm thoroughly happy about how everything is put > together and mostly _just works_. > > I'll note that I'm still very much learning guile and scheme. But the man= ual > (https://www.gnu.org/software/guile/manual/) is amazing. Cool, thanks for the kind words! > I have tried writing some package definitions > (https://notabug.org/thomassgn/guixsd-configuration/src/master/modules/tm= s/). > But I can not get it to even pass evaluation and I don't understand what = is > meant by 'procedure #f'. Assuming I somewhere have a value that should ev= al > to a procedure but evals to false instead - I just don't understand where. [...] > 1024: 4 [bag->derivation # # #] > In srfi/srfi-1.scm: > 573: 3 [map # #] > In guix/packages.scm: > 846: 2 [expand-input # # # ...] > In guix/store.scm: > 1176: 1 [# # > # ...] In unknown file: > ?: 0 [#f # "x86_64-linux" #f] > > ERROR: In procedure #f: > ERROR: Wrong type to apply: #f This backtrace is indeed terrible. I just cloned your repo and then did: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -L /tmp/guixsd-configuration/modules/tms/ wkhtm= ltopdf WARNING: (wkhtmltopdf): `freetype' imported from both (guix licenses) and (= gnu packages fontutils) Backtrace: In ice-9/boot-9.scm: 834:9 19 (catch _ _ # _) 834:9 18 (catch _ _ # =E2=80=A6) In guix/scripts/build.scm: 700:24 17 (_) 629:4 16 (options->derivations _ _) In srfi/srfi-1.scm: 679:15 15 (append-map _ _ . _) 592:17 14 (map1 (#)) In guix/scripts/build.scm: 634:30 13 (_ _) In guix/packages.scm: 789:14 12 (cache! # # =E2=80=A6) In unknown file: 11 (_ # # #) In guix/packages.scm: 1096:22 10 (thunk) 1029:25 9 (bag->derivation # #< name: "= wkhtmltopdf-0.12.4" system: "x86_64-=E2=80=A6> =E2=80=A6) In srfi/srfi-1.scm: 592:29 8 (map1 (("python" #) ("source" =E2=80=A6) =E2=80=A6)) 592:29 7 (map1 (("source" #) =E2=80=A6)) 592:29 6 (map1 (("fontconfig" #) ("f=E2=80=A6" =E2=80=A6) =E2=80=A6)) 592:29 5 (map1 (("freetype" #) ("libpng" #) # =E2=80=A6)) 592:29 4 (map1 (("libpng" #) ("zlib" #<) =E2=80=A6)) 592:17 3 (map1 (("zlib" #< name: "Zlib" uri: "http://www.gzip.= org/zlib/zlib_license.html" comm=E2=80=A6>) =E2=80=A6)) In guix/packages.scm: 849:16 2 (expand-input _ _ _ _ _) In guix/store.scm: 1177:50 1 (_ # #< name: "Zlib" uri:= "http://www.gzip.org/zlib/zlib_lice=E2=80=A6> =E2=80=A6) In unknown file: 0 (_ #< name: "Zlib" uri: "http://www.gzip.org/zlib/zli= b_license.html" comment: "https://ww=E2=80=A6> =E2=80=A6) ERROR: ERROR: Wrong type to apply: #f --8<---------------cut here---------------end--------------->8--- (I=E2=80=99m using Guile 2.2 here, which produces a nicer backtrace.) The warning at the top gives a hint: there=E2=80=99s a name clash between bindings exported by the (guix licenses) module and those exported by (gnu packages fontutils). The bottom of the backtrace is also interesting: we=E2=80=99re getting a object here, where we really want a . The same occurs with =E2=80=98openssl=E2=80=99. To address that, you need to remap the (guix licenses) bindings to avoid the name clash, and to import the right modules for =E2=80=98zlib=E2=80=99 = and =E2=80=98openssl=E2=80=99 (see the patch below). Once that is done, =E2=80=98guix build=E2=80=99 eva= luates the module nicely. HTH! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/modules/tms/wkhtmltopdf.scm b/modules/tms/wkhtmltopdf.scm index 66e41e5..07eb7e0 100644 --- a/modules/tms/wkhtmltopdf.scm +++ b/modules/tms/wkhtmltopdf.scm @@ -3,9 +3,11 @@ #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system python) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages compression) ;zlib #:use-module (gnu packages fontutils) #:use-module (gnu packages image) + #:use-module (gnu packages tls) ;openssl #:use-module (gnu packages xorg) #:use-module (srfi srfi-1)) @@ -55,5 +57,5 @@ thing. GUIX Specific: C library is untested") (home-page "http://wkhtmltopdf.org/") - (license gpl3+))) + (license license:gpl3+))) --=-=-=--