From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IMj2IBHfw159YAAA0tVLHw (envelope-from ) for ; Tue, 19 May 2020 13:28:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QOTDHBHfw16bDQAAbx9fmQ (envelope-from ) for ; Tue, 19 May 2020 13:28:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 015DD940145 for ; Tue, 19 May 2020 13:28:49 +0000 (UTC) Received: from localhost ([::1]:34276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb2IZ-00006H-SA for larch@yhetil.org; Tue, 19 May 2020 09:28:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb2Gs-0005EC-FA for guix-patches@gnu.org; Tue, 19 May 2020 09:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb2Gs-0008No-3M for guix-patches@gnu.org; Tue, 19 May 2020 09:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jb2Gr-0000Yj-VR for guix-patches@gnu.org; Tue, 19 May 2020 09:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41294] [PATCH] gnu: Add libfreenect. Resent-From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 May 2020 13:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41294 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ekaitz Zarraga Cc: "41294@debbugs.gnu.org" <41294@debbugs.gnu.org> Received: via spool by 41294-submit@debbugs.gnu.org id=B41294.15898948052125 (code B ref 41294); Tue, 19 May 2020 13:27:01 +0000 Received: (at 41294) by debbugs.gnu.org; 19 May 2020 13:26:45 +0000 Received: from localhost ([127.0.0.1]:49596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jb2Ga-0000YD-Gx for submit@debbugs.gnu.org; Tue, 19 May 2020 09:26:44 -0400 Received: from rezeros.cc ([45.76.207.221]:50160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jb2GY-0000Xy-Os for 41294@debbugs.gnu.org; Tue, 19 May 2020 09:26:43 -0400 Received: from localhost ( [2409:8a62:37c:ece0:6f8a:f125:6594:b1b5]) by rezeros.cc (OpenSMTPD) with ESMTPSA id e87541a6 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 19 May 2020 13:26:35 +0000 (UTC) Received: from gift (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id d47f0f0c; Tue, 19 May 2020 13:26:23 +0000 (UTC) From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) References: <5kf9uJF2SDo9zwlTUoFI13o7P7q68o-AuSp72MvOp5PUaF2SlAPxzQJvFws5aaTOB5EHY4T3-En0Mhba7hADMIeJkgCeWUOY_Ciy0fv24Ck=@elenq.tech> <87k11c5ymm.fsf@member.fsf.org> <87sgfz1f43.fsf@member.fsf.org> Date: Tue, 19 May 2020 21:26:23 +0800 In-Reply-To: (Ekaitz Zarraga's message of "Sun, 17 May 2020 12:15:06 +0000") Message-ID: <87eergqcn4.fsf@member.fsf.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsf.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: oBlexeDHGhoo Ekaitz Zarraga writes: > Hi, > I came up with this. It's just a diff because I'd like to improve something. > > There's the same lambda sent to all the packages that need to disable > sources compilation but I'm not able to create it in a function that I > send later to all those. > > How can I do that? I'm getting `Unknown object` errors. > > I tried to create a new function with `define*` with the same body the > lambda has. Quasiquote the `arguments` and unquote the function there. > Nothing. There's some kind of weird magic I'm not getting. > Hello, I don't know the whole detail too, but to build a package, guix likely: - Load and eval the package module, to get the package object. The 'arguments' field is a list. - Convert this package object to a derivation, and write it in store as a file (/gnu/store/*.drv). Where 'arguments' being part of the builder, serialize as string to the file, it dosen't do complex things for procedure bindings, only write their string descriptions... So when the builder file is loaded, you get `Unknown object` errors. Here, to avoid duplicating the code, you can: 1. Unquote list value into `arguments`. (eg: 'asdf-substitutions' in lisp.scm) 2. Use `(package-arguments libfreenect-examples)` with `substitute-keyword-arguments` to reuse arguments, but modify `configure-flags` etc. (eg: qtx11extras) The build system can use 'imported-modules' to make a set of guile modules (which can contains useful procedures, etc.) available to the builder, but thas's overkill to be used here... > > diff --git a/gnu/packages/openkinect.scm b/gnu/packages/openkinect.scm > new file mode 100644 > index 0000000000..1aebb34384 > --- /dev/null > +++ b/gnu/packages/openkinect.scm > @@ -0,0 +1,137 @@ > +(define-module (gnu packages openkinect) > + #:use-module (guix packages) > + #:use-module (guix git-download) > + #:use-module (guix build-system cmake) > + #:use-module ((guix licenses) #:prefix license:) > + #:use-module (gnu packages pkg-config) > + #:use-module (gnu packages libusb) > + #:use-module (gnu packages python) > + #:use-module (gnu packages python-xyz) > + #:use-module (gnu packages gl) > + #:use-module (gnu packages pkg-config) > + #:use-module (gnu packages image-processing)) > + > +(define-public libfreenect > + (let ((version "0.6.1")) > + (package > + (name "libfreenect") > + (version version) > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/OpenKinect/libfreenect") > + (commit (string-append "v" version)))) > + (sha256 > + (base32 "0was1va167rqshmpn382h36yyprpfi9cwillb6ylppmnfdrfrhrr")))) > + (build-system cmake-build-system) > + (arguments > + '(#:tests? #f ; Project has not tests "has not tests" sounds wrong be me, maybe: "package has no tests". Otherwise, look good to me!