From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id rECIMfzYEWUShgEA9RJhRA:P1 (envelope-from ) for ; Mon, 25 Sep 2023 21:01:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id rECIMfzYEWUShgEA9RJhRA (envelope-from ) for ; Mon, 25 Sep 2023 21:01:16 +0200 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 B3CFC472F9 for ; Mon, 25 Sep 2023 21:01:16 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695668476; 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: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; bh=EMSZTM7iLa+XtEO6ES+LkkWhkbAW1D3S+SqqLK6W7IQ=; b=UB7fHwKpA40a4MhwWmpJvxAEQMBsjlIGlk2qVWVwxnVbdnEIN6W7PbOPgBCGmVtNG0l49G S51zS6wLtO6616UR9J49hkK/A5pFe8Wk/n4mwwAgKAnHGJSXsskbORfpbJpArzY6ZLNAEN rJpDL4g9/V8/h5vxMkzjPT/CdaJB3qY8KSNIu6u4FPEvb0eSKYBHTYStS2Fh/iHWH2+sDi VQqlg5AbNkZDiPojQCJ0BB32ztAvz2b6FjoKMapHDp1Pk3UaiGh1hcUZvR43d4vcJx3u6Y PQ15UPxxF8de9Fw5u/AnTDSC08d6CLOwvp4FQJXZIdtZ1iWD26hBIapA/XPLZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695668476; a=rsa-sha256; cv=none; b=P1dv5DYf0J5hfo54DceikhCV1l4i7OFNeG/nAs3VvtFCU1h0put4AYPm1uxfqukjlH64x5 gLlTsS8uuqseYnC+RmUM/K2i6Rk6czjPx81FY4WGBlQHs0pKjZd3IJ32tDZSIQToFPdqoB AsIXoY5PgWeHNM0jLcQhpEqyb1EU8pWuC3qwf8BdXq82tRXwT6AlbGGrlZ6oq3RKWU3LTi OAiuLs1UrwhfUGvTPYQ0h1IeYwu7vM1SohyAYjobBdtYCFdAo+Q5gni8eQ703zSIovewlI 3JMw3r6hzZfZBYusgV5RIxyEPKAtC/iL9qKJhJkJikWovTvqHk6ETZXxNikjlA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkqpH-0002MR-76; Mon, 25 Sep 2023 15:00:59 -0400 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 1qkqp8-0002Jk-6y for guix-patches@gnu.org; Mon, 25 Sep 2023 15:00:52 -0400 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 1qkqp7-0005P1-Vk for guix-patches@gnu.org; Mon, 25 Sep 2023 15:00:49 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkqpK-0002Fi-5I for guix-patches@gnu.org; Mon, 25 Sep 2023 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66193] [PATCH] gnu: Add keyd. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Sep 2023 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66193 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ShinyZero0 Cc: 66193@debbugs.gnu.org Received: via spool by 66193-submit@debbugs.gnu.org id=B66193.16956684188592 (code B ref 66193); Mon, 25 Sep 2023 19:01:02 +0000 Received: (at 66193) by debbugs.gnu.org; 25 Sep 2023 19:00:18 +0000 Received: from localhost ([127.0.0.1]:46675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkqob-0002EV-Bb for submit@debbugs.gnu.org; Mon, 25 Sep 2023 15:00:18 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:40690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkqoV-0002D2-J9 for 66193@debbugs.gnu.org; Mon, 25 Sep 2023 15:00:15 -0400 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qkqoD-00021f-Ae; Mon, 25 Sep 2023 14:59:53 -0400 Date: Mon, 25 Sep 2023 14:59:53 -0400 (EDT) From: Jack Hill X-X-Sender: jackhill@marsh.hcoop.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.70 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: B3CFC472F9 X-Spam-Score: -4.70 X-TUID: frYGfgIjYtOw On Mon, 25 Sep 2023, ShinyZero0 wrote: > From 01e89ff48c77e12b7a8f206098901e08bc979935 Mon Sep 17 00:00:00 2001 > From: "zero@fedora" > Date: Mon, 25 Sep 2023 19:39:00 +0300 > Subject: [PATCH] gnu: Add keyd > > * gnu/packages/keyd.scm: New file. Thanks for your submission. keyd looks like a neat package that I did not know about before! I'll leave some comments below about some things that I think can be improved. Can you look into them and send a second version? > --- > gnu/packages/keyd.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 gnu/packages/keyd.scm When adding a new file, it should also be added to the list of files in gnu/local.mk. Also, the "This file is party of GNU Guix" header should be added to the beginning of this file (it can be copied from another one). You can also add a copyright line for yourself! Alternatively, you could put keyd in an existing file. linux.scm might be a good one. This is a little bit of a judgment call, and I'm not experienced enough to know what's best. Maybe someone else will chime in here, or you could ask for advice on IRC. > diff --git a/gnu/packages/keyd.scm b/gnu/packages/keyd.scm > new file mode 100644 > index 0000000000..48afd9f877 > --- /dev/null > +++ b/gnu/packages/keyd.scm > @@ -0,0 +1,43 @@ > +(define-module (gnu packages keyd)) > +(use-modules > + (guix packages) > + (gnu packages linux) > + (guix git-download) > + ((guix licenses) #:prefix license:) > + (guix build-system gnu)) > +(define-public keyd > + (package > + (name "keyd") > + (version "2.4.3") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/rvaiya/keyd") > + (commit (string-append "v" version)))) > + (sha256 > + (base32 > + "1awdp863amq95y990fi4wj389ssv3ip2daqz2ph23lsahwa6f5in")))) > + (arguments > + (list #:tests? ; no tests > + #f I looks to me like there are tests in the t directory. Can they be enabled? https://github.com/rvaiya/keyd/blob/5e4ef41b41ce02f7d6a9f2e51298810d84589e76/Makefile#L87-L91 Also, a little bit of a nitpick, but I think it would be easier to read if #tests? and #f were on the same line. > + #:make-flags > + '(list "CC=gcc" Unfortunately, there's a subtle bug here. Most of the time this will work, but when cross compiling, it will pick the wrong GCC (oops!). Fortunately we have a cc-for-target procedure that will pick the right one. Here's an example of it in use: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/linux.scm?id=fafd3caef0d51811a5da81d6061789e2908b0dac#n1591 > + "PREFIX=" > + (string-append > + "DESTDIR=" > + (assoc-ref %outputs "out"))) This can probably be upgraded to the new style of using gexps to find the output. The above example package does that. See also this blog post for the long explanation: https://guix.gnu.org/en/blog/2021/the-big-change/ > + #:phases > + '(modify-phases > + %standard-phases > + (delete 'configure)))) ; no autoconf > + (build-system gnu-build-system) > + (inputs (list linux-libre-headers)) > + (synopsis "A key remapping daemon for linux.") > + (description > + "Keyd is a keyboard remapping utility with intuitive ini > + config file format. Keyd has several unique features, many of > + which are traditionally only found in custom keyboard firmware > + like QMK") Another nitpick: intuitive and unique sound like marketing words to me and can probably be left out. However that's just my taste. > + (home-page "https://github.com/rvaiya/keyd") > + (license license:expat))) That's all I have for know. Thanks again for your contribution, and hopefully you found this review helpful. All the best, Jack