From patchwork Thu Aug 26 11:10:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 32303 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8133727BBE3; Thu, 26 Aug 2021 12:11:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4644727BBE1 for ; Thu, 26 Aug 2021 12:11:24 +0100 (BST) Received: from localhost ([::1]:37394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJDI3-0005JG-66 for patchwork@mira.cbaines.net; Thu, 26 Aug 2021 07:11:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJDHk-0005GQ-Iq for guix-patches@gnu.org; Thu, 26 Aug 2021 07:11:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJDHi-0001MH-3I for guix-patches@gnu.org; Thu, 26 Aug 2021 07:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJDHh-0001Du-Ue for guix-patches@gnu.org; Thu, 26 Aug 2021 07:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50157] [PATCH v2 1/2] build-system: linux-module: Support source-directory. References: <20210821220053.31441-1-leo.prikler@student.tugraz.at> In-Reply-To: <20210821220053.31441-1-leo.prikler@student.tugraz.at> Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Aug 2021 11:11: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: 50157@debbugs.gnu.org Cc: maximedevos@telenet.be, efraim@flashner.co.il Received: via spool by 50157-submit@debbugs.gnu.org id=B50157.16299762564675 (code B ref 50157); Thu, 26 Aug 2021 11:11:01 +0000 Received: (at 50157) by debbugs.gnu.org; 26 Aug 2021 11:10:56 +0000 Received: from localhost ([127.0.0.1]:48499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJDHb-0001DK-Ow for submit@debbugs.gnu.org; Thu, 26 Aug 2021 07:10:56 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:8478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJDHZ-0001DB-Uw for 50157@debbugs.gnu.org; Thu, 26 Aug 2021 07:10:55 -0400 Received: from localhost.localdomain (194-118-34-199.adsl.highway.telekom.at [194.118.34.199]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GwKs62b0Cz1LZWB; Thu, 26 Aug 2021 13:10:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GwKs62b0Cz1LZWB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1629976250; bh=xPqcyspfjmWUi3voxvSui17aL5Sm8k62LvHvmmG6qwY=; h=From:To:Cc:Subject:Date:From; b=TywMdG6uRjyhmTLAzHekjd1wUm2yFc9y64rJkfrqzBduzEMaXdg40rsK6u2HdihK0 s9xHAZIY68DFn4N7HAC4OCXkSQrq9RjPTrfukhCj2+nBK7i1Czs0OFhJHO2uaxaDGT IWwPfaf9NSUAgRW0zMtChksXDfYWEWV5xsJ5TBQ0= From: Leo Prikler Date: Thu, 26 Aug 2021 13:10:34 +0200 Message-Id: <20210826111035.20464-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches As with guile-build-system, the module to be build need not necessarily live at the root of the build tree. * guix/build/linux-module-build-system.scm (build, install): Add source-directory argument and append it to "M" variable when invoking make. * guix/build-system/linux-module.scm (linux-module-build): Add source-directory argument. --- guix/build-system/linux-module.scm | 4 +++- guix/build/linux-module-build-system.scm | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index fc3d959ce7..33bc8c95df 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -158,6 +158,7 @@ (outputs '("out")) (make-flags ''()) (system (%current-system)) + (source-directory ".") (guile #f) (substitutable? #t) (imported-modules @@ -175,7 +176,8 @@ ((source) source) (source - source)) + source)) + #:source-directory ,source-directory #:search-paths ',(map search-path-specification->sexp search-paths) #:phases ,phases diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm index d51d76f94b..729ab6154f 100644 --- a/guix/build/linux-module-build-system.scm +++ b/guix/build/linux-module-build-system.scm @@ -49,16 +49,17 @@ ; TODO: kernel ".config". #t) -(define* (build #:key inputs make-flags #:allow-other-keys) +(define* (build #:key inputs make-flags (source-directory ".") #:allow-other-keys) (apply invoke "make" "-C" (string-append (assoc-ref inputs "linux-module-builder") "/lib/modules/build") - (string-append "M=" (getcwd)) + (string-append "M=" (getcwd) "/" source-directory) (or make-flags '()))) ;; This block was copied from make-linux-libre--only took the "modules_install" ;; part. -(define* (install #:key make-flags inputs native-inputs outputs +(define* (install #:key make-flags (source-directory ".") + inputs native-inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (moddir (string-append out "/lib/modules"))) @@ -67,7 +68,7 @@ (apply invoke "make" "-C" (string-append (assoc-ref inputs "linux-module-builder") "/lib/modules/build") - (string-append "M=" (getcwd)) + (string-append "M=" (getcwd) "/" source-directory) ;; Disable depmod because the Guix system's module directory ;; is an union of potentially multiple packages. It is not ;; possible to use depmod to usefully calculate a dependency From patchwork Thu Aug 26 11:10:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 32304 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A7AA327BBE3; Thu, 26 Aug 2021 12:11:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5EE4627BBE1 for ; Thu, 26 Aug 2021 12:11:46 +0100 (BST) Received: from localhost ([::1]:37974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJDIP-0005i2-Dn for patchwork@mira.cbaines.net; Thu, 26 Aug 2021 07:11:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJDHk-0005GR-IN for guix-patches@gnu.org; Thu, 26 Aug 2021 07:11:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJDHi-0001MT-FH for guix-patches@gnu.org; Thu, 26 Aug 2021 07:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJDHi-0001E1-AW for guix-patches@gnu.org; Thu, 26 Aug 2021 07:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50157] [PATCH v2 2/2] gnu: Add xpadneo. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Aug 2021 11:11:02 +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: 50157@debbugs.gnu.org Cc: maximedevos@telenet.be, efraim@flashner.co.il Received: via spool by 50157-submit@debbugs.gnu.org id=B50157.16299762594694 (code B ref 50157); Thu, 26 Aug 2021 11:11:02 +0000 Received: (at 50157) by debbugs.gnu.org; 26 Aug 2021 11:10:59 +0000 Received: from localhost ([127.0.0.1]:48502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJDHf-0001Dd-1X for submit@debbugs.gnu.org; Thu, 26 Aug 2021 07:10:59 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:11738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJDHc-0001DS-VO for 50157@debbugs.gnu.org; Thu, 26 Aug 2021 07:10:57 -0400 Received: from localhost.localdomain (194-118-34-199.adsl.highway.telekom.at [194.118.34.199]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GwKs76yP1z1LZWS; Thu, 26 Aug 2021 13:10:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GwKs76yP1z1LZWS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1629976252; bh=NQkJq0qlfE0AtZ8llODsN9miOlq2P8NyHdrAIrZn0NQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X2Ae6rsGnmPG5pRyZ8sB/MZPrrhvxkwSvHRyjCzCNy2aXZsC5rDkbgpD8FJd6gmot yxa2HuairhKWtMxuBzxOaGSUBmOo/pi9S6l4W9Ru8zmoBL4m4hgwA1D0cuIejsIR1s zaRksgdTy7JZDfdUdb3JJKCTurQGt4GqPGijhyZo= From: Leo Prikler Date: Thu, 26 Aug 2021 13:10:35 +0200 Message-Id: <20210826111035.20464-2-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210826111035.20464-1-leo.prikler@student.tugraz.at> References: <20210826111035.20464-1-leo.prikler@student.tugraz.at> MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (xpadneo): New variable. --- gnu/packages/linux.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 7b92be4b9c..4383048403 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1505,6 +1505,41 @@ 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 + "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14ism")))) + (build-system linux-module-build-system) + (arguments + `(#:tests? #f ; no `check' target + #:source-directory "hid-xpadneo/src" + #:phases + (modify-phases %standard-phases + (add-after 'install 'post-install + (lambda* (#:key outputs #:allow-other-keys #:rest args) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively "hid-xpadneo/etc-modprobe.d" + (string-append out "/etc/modprobe.d")) + (copy-recursively "hid-xpadneo/etc-udev-rules.d" + (string-append out "/etc/udev/rules.d")))))))) + (home-page "https://atar-axis.github.io/xpadneo/") + (synopsis "Xbox One Wireless Controller driver") + (description + "This package provides a driver for the XBox One S Wireless controller +and some newer models when connected via bluetooth. In addition to the kernel +module provided itself, it also contains a modprobe configuration and udev +rules, which need to be installed separately.") + (license license:gpl3+))) + ;;; ;;; Pluggable authentication modules (PAM).