From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yAk/CL2PdmczmAAAqHPOHw:P1 (envelope-from ) for ; Thu, 02 Jan 2025 13:08:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yAk/CL2PdmczmAAAqHPOHw (envelope-from ) for ; Thu, 02 Jan 2025 14:08:13 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZTREqNSP; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=dAs4dxBF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735823292; h=from:from:sender:sender:reply-to: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=o+pKyShB6fP9V4rCdWK9VZfWnYdd6uJbuSu4510XFSQ=; b=pCkl5kUyScnvyqIm06EMUJyKs/uurNLDpzM7tMo61kIuTfa8skAjp6jdWtm1/BYNTAo8Uu QmC72eJp15VQCrIBQ4wYEjgBEP201zTfyZNmr+WddqqvJZ86EpdOK21f0EHEgSTgdd9kWk 16vbqeNb2+AV4Mi7mZZv1L2US2BzCC+Ke7qCwFDfqZgAxBFxYit7B0qoCiSfa5LZuGK9K4 QnPIuohbq77EZd7/tX9r1WQaEux5+vcdikb2trrTQ7+05UxaCr2W3D3TU3sk7eBN6OYvJI 5jMFLZ2eSAhsB5Hx0nrEjSMH6FokOyeHkJC84m+WTRh35gIR+2rscKTqkN1i5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZTREqNSP; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=dAs4dxBF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735823292; a=rsa-sha256; cv=none; b=rW30T1H5WTcn8xYsyGRnOpQpStRi3WVKMBnk157eu4yaXb59Lckn0iCDNCIqECAohOmldU xg3WuGjQ65f0RGOOfEpOiSorM0UHd8ljpa+lrIwJkP25jIyHp99Hwjoq4dtEDxoneO68pW wTGqot/lRr9JyVoisLNTLdQiKQ2QfxlVl0Q2tc+oHc/MfDhaant+u0lb9x1xg2FCJq/zLZ 9fkwCDXR+NFKzD6NHExwp7Fzg/ODw5q6E8+INgC3DNojZggkOcqhJAFUu7+zfHwYotjuZ0 NBf2xuO4qADsadrrHe1Isw/RVaQKAUf335OarxAxxdE1nHHFWxcf8ru5zDnn3w== 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 27A905B08B for ; Thu, 02 Jan 2025 14:08:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTKvn-0002Ka-Bu; Thu, 02 Jan 2025 08:08:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTKvj-0002KL-0T for guix-patches@gnu.org; Thu, 02 Jan 2025 08:08:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTKvi-0002qF-Di for guix-patches@gnu.org; Thu, 02 Jan 2025 08:08:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=o+pKyShB6fP9V4rCdWK9VZfWnYdd6uJbuSu4510XFSQ=; b=ZTREqNSP/4Dm8rTmFcS7oGEMeAmlnXrilVqxY9cNGN47Oz8iPXtLlAzLI4Hn/vpcsmikaUvNpvNe7gbt6upNaeRA3Fi4n7JqK3dTRaiF2D86nfJUXwb42oAZ0ggNYLEhVPDXGD51FFt/V9p43BDis1MQ5BKb+ms2wzq55/vnaZHdY8gy8erpwem1etGa8YTpfRcw+x1uOcBGhGcWY0mGNJNGKD5DfwQ4As49IFCv0isCV2bgedPHgSra6Em79/tA9XoV2yF6nb8w6Q3TBNfJLii2BP80XItGbCKF7MnlB9tU65p7lLYamFkQk8mP/eQDi1ppqXrOZXqIgjSDnscWSw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTKvh-0007Wb-Ts; Thu, 02 Jan 2025 08:08:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75283] [PATCH rust-team] gnu: rust-xremap: Use output for each feature. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Thu, 02 Jan 2025 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75283@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by submit@debbugs.gnu.org id=B.173582324128873 (code B ref -1); Thu, 02 Jan 2025 13:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jan 2025 13:07:21 +0000 Received: from localhost ([127.0.0.1]:43086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTKv2-0007Vc-Od for submit@debbugs.gnu.org; Thu, 02 Jan 2025 08:07:21 -0500 Received: from lists.gnu.org ([2001:470:142::17]:53828) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTKv0-0007VM-2W for submit@debbugs.gnu.org; Thu, 02 Jan 2025 08:07:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTKut-0002FM-U1 for guix-patches@gnu.org; Thu, 02 Jan 2025 08:07:11 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117] helo=email.rimm.ee) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tTKur-0002lq-8a for guix-patches@gnu.org; Thu, 02 Jan 2025 08:07:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1735823217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o+pKyShB6fP9V4rCdWK9VZfWnYdd6uJbuSu4510XFSQ=; b=dAs4dxBFML34GrREWHvu2n5NOUghZn0Jx/RWekTz2HOLRx+qoPiZggZa+w6PaYMwEleo1X IPzZ97NRgJVk9c1M1fLiRDADugacN4Qjs3ua1iJ2NN6bnymTl3crKdxsQtXKfeyaQxpJFH Zhnef+0amsmzYvOceg0nQUgWoTaPX7Qw8W2nLIYmQaSd0emVj0vbqHvA00dw57Q5eaen73 xgdKvjxnjT6Mxb4GXKolZi2oS9VDF9TUqnNT2irSnU0PFxJmS7QebPTEPxu514Tbf6z28R E7bJbvvymzyzAmTImv7VqHIf9HfE9N1q32mRxYHW9CFWGa2Bv66ZOgQAK3pipw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 0d3f22dd (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Thu, 2 Jan 2025 13:06:57 +0000 (UTC) Date: Thu, 2 Jan 2025 14:06:09 +0100 Message-ID: <940b18daf5a018d28047b31ff0585893530e5c2a.1735823152.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@rimm.ee; helo=email.rimm.ee X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 27A905B08B X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -3.69 X-Spam-Score: -3.69 X-TUID: 32oGDct6gytY * gnu/packages/rust-apps.scm (output-features): Add procedure. (rust-xremap)[outputs]: Add. [arguments]: Remove features, add modules and output-features phases. (xremap-gnome, xremap-kde, xremap-wlroots, xremap-hyprland, xremap-sway, xremap-x11): Deprecate. Change-Id: I9cf6a27f908a0fa42e89daba12fba3615d05ad4e --- gnu/packages/rust-apps.scm | 79 +++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 2182daa2f30..074c1f56408 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2023, 2024 Jaeme Sifat ;;; Copyright © 2023 Steve George ;;; Copyright © 2024 Troy Figiel -;;; Copyright © 2024 Herman Rimm +;;; Copyright © 2024-2025 Herman Rimm ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> ;;; Copyright © 2024 Suhail Singh ;;; Copyright © 2024 Jordan Moore @@ -113,7 +113,8 @@ (define-module (gnu packages rust-apps) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages webkit) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:use-module (srfi srfi-1)) (define-public aardvark-dns (package @@ -4244,6 +4245,34 @@ (define-public git-delta @command{grep} and a stylized box presentation.") (license license:expat))) +(define* (output-features output #:optional (features (list output))) + (define (phase-name prefix) + (string->symbol (string-append prefix "-" output))) + + (define set-args + `(let loop ((lst args) + (result '())) + (match lst + (() (reverse result)) + ((#:outputs outputs rest ...) + ;; XXX: Make give output the default. + (loop rest (cons* `(("out" . ,(assoc-ref outputs ,output))) + #:outputs result))) + ((#:features _ rest ...) + (loop rest (cons* ',features #:features result))) + ((kw value rest ...) + (loop rest (cons* value kw result)))))) + ;; XXX: Run after previous install-output phase. + `((add-after 'install ',(phase-name "build") + (lambda args + (apply (assoc-ref %standard-phases 'build) ,set-args))) + (add-after ',(phase-name "build") ',(phase-name "check") + (lambda args + (apply (assoc-ref %standard-phases 'check) ,set-args))) + (add-after ',(phase-name "check") ',(phase-name "install") + (lambda args + (apply (assoc-ref %standard-phases 'install) ,set-args))))) + (define-public rust-xremap (package (name "rust-xremap") @@ -4257,9 +4286,9 @@ (define-public rust-xremap (base32 "0whvw9bbgjf5znb3025iqkj2aijasg6fcx9q1jy97kb0s4m996q2")))) (build-system cargo-build-system) + (outputs '("out" "hyprland" "gnome" "kde" "wlroots" "x11")) (arguments - `(#:features '() - #:install-source? #f + `(#:install-source? #f #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1) ("rust-clap" ,rust-clap-4) @@ -4283,8 +4312,13 @@ (define-public rust-xremap ("rust-wayland-protocols-wlr" ,rust-wayland-protocols-wlr-0.1) ("rust-x11rb" ,rust-x11rb-0.13) ("rust-zbus" ,rust-zbus-1)) + #:modules ((guix build cargo-build-system) + (guix build utils) + (ice-9 match)) #:phases (modify-phases %standard-phases + ,@(concatenate (map output-features (drop outputs 1))) + ;; XXX: Separately output default xremap and completions? (add-after 'install 'install-completions (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -4312,47 +4346,22 @@ (define-public rust-xremap (license license:expat))) (define-public xremap-gnome - (package - (inherit rust-xremap) - (name "xremap-gnome") - (arguments - (substitute-keyword-arguments (package-arguments rust-xremap) - ((#:features _) '(list "gnome")))))) + (deprecated-package "xremap-gnome" rust-xremap)) (define-public xremap-kde - (package - (inherit rust-xremap) - (name "xremap-kde") - (arguments - (substitute-keyword-arguments (package-arguments rust-xremap) - ((#:features _) '(list "kde")))))) + (deprecated-package "xremap-kde" rust-xremap)) (define-public xremap-wlroots - (package - (inherit rust-xremap) - (name "xremap-wlroots") - (arguments - (substitute-keyword-arguments (package-arguments rust-xremap) - ((#:features _) '(list "wlroots")))))) + (deprecated-package "xremap-wlroots" rust-xremap)) (define-public xremap-hyprland - (package - (inherit rust-xremap) - (name "xremap-hyprland") - (arguments - (substitute-keyword-arguments (package-arguments rust-xremap) - ((#:features _) '(list "hyprland")))))) + (deprecated-package "xremap-hyprland" rust-xremap)) (define-public xremap-sway - (deprecated-package "xremap-sway" xremap-wlroots)) + (deprecated-package "xremap-sway" rust-xremap)) (define-public xremap-x11 - (package - (inherit rust-xremap) - (name "xremap-x11") - (arguments - (substitute-keyword-arguments (package-arguments rust-xremap) - ((#:features _) '(list "x11")))))) + (deprecated-package "xremap-x11" rust-xremap)) (define-public xsv (package base-commit: 5f92f009a19c1a5a8b7df5a7bcb1e1f283a953f8 -- 2.45.2