From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UFMWNzc9ImHaCgAAgWs5BA (envelope-from ) for ; Sun, 22 Aug 2021 14:04:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8GHGMjc9ImGwaAAAbx9fmQ (envelope-from ) for ; Sun, 22 Aug 2021 12:04:07 +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 6B7DE1335A for ; Sun, 22 Aug 2021 14:04:07 +0200 (CEST) Received: from localhost ([::1]:34150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHmCs-0007pl-46 for larch@yhetil.org; Sun, 22 Aug 2021 08:04:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHmCo-0007pO-8b for guix-patches@gnu.org; Sun, 22 Aug 2021 08:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHmCo-0007uj-0a for guix-patches@gnu.org; Sun, 22 Aug 2021 08:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mHmCn-0007di-Mi for guix-patches@gnu.org; Sun, 22 Aug 2021 08:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50157] [PATCH] gnu: Add xpadneo. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Aug 2021 12:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50157 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 50157@debbugs.gnu.org, Maxime Devos Received: via spool by 50157-submit@debbugs.gnu.org id=B50157.162963382329341 (code B ref 50157); Sun, 22 Aug 2021 12:04:01 +0000 Received: (at 50157) by debbugs.gnu.org; 22 Aug 2021 12:03:43 +0000 Received: from localhost ([127.0.0.1]:38281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHmCR-0007d8-D4 for submit@debbugs.gnu.org; Sun, 22 Aug 2021 08:03:43 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:51030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHmCL-0007cs-PF for 50157@debbugs.gnu.org; Sun, 22 Aug 2021 08:03:38 -0400 Received: from nijino.local (62-47-226-13.adsl.highway.telekom.at [62.47.226.13]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GsvCk3wRQz1LLyW; Sun, 22 Aug 2021 14:03:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GsvCk3wRQz1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1629633810; bh=1SM7IM8ikwAv5xhN+bQ4E0Bti/fCus8Pm8xdkAP8gxM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=elXlWEHYOr2yHgXovg17oqjadI1DijNHMDoDsHVtSmv9DqtD97WAWZdShk+Al+DSp DZpc0wgj9zlF0lajKo/PXQMBBeehO5RdYCDI90DiU2p5VLcWsUUbb/NRqcsJVTZtp8 kjp1eAp0ABC1/pcvB4USziwfG4R1vFzbjN/a1Pfo= Message-ID: From: Leo Prikler Date: Sun, 22 Aug 2021 14:03:29 +0200 In-Reply-To: References: <20210821220053.31441-1-leo.prikler@student.tugraz.at> <38410a183350db8ffcf597b9fd1866a269333a05.camel@telenet.be> <5a98ec927846aeebf5c567e94154003fca07b78f.camel@student.tugraz.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629633847; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1SM7IM8ikwAv5xhN+bQ4E0Bti/fCus8Pm8xdkAP8gxM=; b=HmQO21DJ95IRkdoI5lxzVJxJeX3MDELJaOf/BYtbm24OCjs+rC368StPDImEYnQuJRP91G qnPedLkY5iySj4GNBIEc8/9RcVE21QjJMYDmGQcMlyhy6Dnv9CPdtLPrfCXURXD+1TCRXS EZ41ujA9HjOAHSNNVewRl8vt9ZgBGANrjlRVuBN97ioaj8My0aiy/r2HNEWSYHBBC6rkPo oiHux54eGwXhQJCCmQLWnPZ0zuqxBtGLNiooS8NtGKKScRo7kfU8VRzV+FfnVp7fq/jli4 JW+tGC1kRCeoXSsz0sovW5ySp4T8jKOs5ZPMQR7OHIrftYI+xcQ9zKQ/8JjGIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629633847; a=rsa-sha256; cv=none; b=iHSBRoLEcPEJUbvCFiZveNKD6N7cdz7xUvk2wcT+Cfia3CQ9KX4/TvIb0cLxHX6TskYdRg sh4zARJd/yHwy9EfaoFSSNIoTtQj0VUJDDejh4OijY8bBn9OKHmM7WMTobK86l43Sv/q2F 3bYil4JDNDdqjdYVkhqMB+pPTOyvkX2RagoGgBwHCmz+A+qWCsn2QJ3tRJ9Y/rI4LSWjgP Fmi8DDvZ/DaLM6r4a4MWovFNYHiOPhqxX/Leu7qxhrSWBzhvCwGt0R3bWk3S2LarX/X/+M i8Hb0k/8hdhIfIK/zbikL4EGi7kcViF7wUDsoPt7sTn+tjbB8kNbos0aBo4tjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=elXlWEHY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (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-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=elXlWEHY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (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-Migadu-Queue-Id: 6B7DE1335A X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: zaxCyKQsqvLg Am Sonntag, den 22.08.2021, 14:32 +0300 schrieb Efraim Flashner: > On Sun, Aug 22, 2021 at 12:08:57PM +0200, Leo Prikler wrote: > > Am Sonntag, den 22.08.2021, 11:58 +0200 schrieb Maxime Devos: > > > Leo Prikler schreef op zo 22-08-2021 om 00:00 [+0200]: > > > > * gnu/packages/linux.scm (xpadneo): New variable. > > > > --- > > > > gnu/packages/linux.scm | 52 > > > > ++++++++++++++++++++++++++++++++++++++++++ > > > > 1 file changed, 52 insertions(+) > > > > > > > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > > > > index 7b92be4b9c..385cdd558b 100644 > > > > --- a/gnu/packages/linux.scm > > > > +++ b/gnu/packages/linux.scm > > > > @@ -1505,6 +1505,58 @@ allows some more serious things like > > > > adding > > > > streaming capabilities to an > > > > application by hooking GStreamer into the loopback device.") > > > > (license license:gpl2+))) > > > > > > > > +(define-public xpadneo > > > > + (package > > > > + (name "xpadneo") > > > > + (version "0.9.1") > > > > + (source (origin > > > > + (method git-fetch) > > > > + (uri (git-reference > > > > + (url "https://github.com/atar-axis/xpadneo > > > > ") > > > > + (commit (string-append "v" version)))) > > > > + (file-name (git-file-name name version)) > > > > + (sha256 > > > > + (base32 > > > > + "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgx > > > > kh14 > > > > ism")))) > > > > + (build-system linux-module-build-system) > > > > + (arguments > > > > + `(#:tests? #f ; no `check' target > > > > + #:modules (((guix build copy-build-system) #:prefix > > > > copy:) > > > > + (guix build linux-module-build-system) > > > > + (guix build utils)) > > > > + #:imported-modules > > > > + ((guix build copy-build-system) > > > > + ,@%linux-module-build-system-modules) > > > > + #:phases > > > > + (modify-phases %standard-phases > > > > + (replace 'configure > > > > + (lambda args > > > > + (with-directory-excursion "hid-xpadneo/src" > > > > + (apply (assoc-ref %standard-phases 'configure) > > > > args)))) > > > > + (replace 'build > > > > + (lambda args > > > > + (with-directory-excursion "hid-xpadneo/src" > > > > + (apply (assoc-ref %standard-phases 'build) > > > > args)))) > > > > + (replace 'install > > > > + (lambda args > > > > + (with-directory-excursion "hid-xpadneo/src" > > > > + (apply (assoc-ref %standard-phases 'install) > > > > args)))) > > > > > > It might be a bit simpler to add a 'chdir' phase: > > > > > > (add-after 'unpack 'chdir > > > (lambda _ > > > (chdir "hid-xpadneo/src"))) > > > > > > instead of these 'with-directory-excursion'. > > That may be true, but in that case there's no "clean" way of > > exiting. > > I could do (chdir "..") in post-install, but that feels weird. > > > > WDYT? > > > > Where is the license file located? You could add a phaes after > 'install > to chdir back ".." and then just use install-file for the files for > etc. > Then the 'install-license phase would also work correctly. The license file is at the root of the tree. FWIW, there is an ongoing issue on whether to interpret the license as GPL3 or GPL3+ [1], which I interpreted as the latter for a lack of file headers. So in the chdir case, I would have to chdir two to three times, depending on how much I want to type, leaving the CWD dirty between phase changes. The directory-excursion hack is a little more verbose, but mostly captures my intent and needs to be applied exactly thrice. One could probably make it even smarter by writing a lambda for the phase rewriting or instead provide build-system support for linux modules in subdirectories. (Perhaps we could even add modify-phases support to add "advice" to phases Emacs-style.) Regards, Leo [1] https://github.com/atar-axis/xpadneo/issues/289