From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UAK2KSQSP2OCpwAAbAwnHQ (envelope-from ) for ; Thu, 06 Oct 2022 19:36:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2BrKKSQSP2NIPwEA9RJhRA (envelope-from ) for ; Thu, 06 Oct 2022 19:36:36 +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 21681B99C for ; Thu, 6 Oct 2022 19:36:36 +0200 (CEST) Received: from localhost ([::1]:50700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogUnT-0005Ya-6R for larch@yhetil.org; Thu, 06 Oct 2022 13:36:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogTul-0000uZ-6N for guix-patches@gnu.org; Thu, 06 Oct 2022 12:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogTuk-000216-UJ for guix-patches@gnu.org; Thu, 06 Oct 2022 12:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogTuk-0002ZD-Pd for guix-patches@gnu.org; Thu, 06 Oct 2022 12:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58339] [PATCH 1/2] gnu: Add guix-hello. References: <20221006163609.2280960-1-zimon.toutoune@gmail.com> In-Reply-To: <20221006163609.2280960-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Oct 2022 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58339 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58339@debbugs.gnu.org Cc: Efraim Flashner , zimoun Received: via spool by 58339-submit@debbugs.gnu.org id=B58339.16650743939840 (code B ref 58339); Thu, 06 Oct 2022 16:40:02 +0000 Received: (at 58339) by debbugs.gnu.org; 6 Oct 2022 16:39:53 +0000 Received: from localhost ([127.0.0.1]:33377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogTua-0002Yb-IP for submit@debbugs.gnu.org; Thu, 06 Oct 2022 12:39:52 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:36475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogTuW-0002YB-R7 for 58339@debbugs.gnu.org; Thu, 06 Oct 2022 12:39:49 -0400 Received: by mail-wr1-f53.google.com with SMTP id j7so3571937wrr.3 for <58339@debbugs.gnu.org>; Thu, 06 Oct 2022 09:39:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=5hd1zsUjzN4zgLFAE+R5oYL7ED+3i3nPHUYXzXElBAY=; b=L74f1rzZA+gLVuMXOOkAuglerWJ3RL9YLe2q49h37eMbM4RfuBitMl0W7QEOSNd85T UO4nd6CywnNf+seVrNf9uIz+a53sgJ6yflTgBKXf0aquOHs7ieqXqzQrm3c2CzCzOBzR lHtzZVtQOYgfsJgRPrJpDF2gxLR1A3AtAuhudyvTG51G5I2xgA36pF+aM5R+O3bvyzRc qjxBzpLzF/Vs7PHvOBthtOQvWtvBZ6DOnDlrHNwhzbWRkLG4vg8Jy2otBmdrzP0vP43Y g8HCrEojmjjRzEDXIdPmFvzR4Sl5meG2RbJCjtY3mzUt+N3v08khKfmYQ8BAFpniZd3r C3kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=5hd1zsUjzN4zgLFAE+R5oYL7ED+3i3nPHUYXzXElBAY=; b=KwYzMLILm28UdjbB8hIod56CAuv/b9VL1H+q04j/LDUEQlwK3pB/EKAgTVNuNerz7j T9CsU0Gjced05vqONnInltF90zaVB4Fo+uEjtGGuBqqOspnm+EheglAMPDMkpACgYmB3 fVMKftXuGU6e75sWdFnSE0dTcd6Pucqje3HukBKrktY8WTRiD4FsisqNV+DexIxwjUib 4YaxDhfXxY2C3Ap3uX0uBDCObzEDn8qnbS791fR0L9PQYCHpntBbmJ1MA1e+4BLRaBPf /MNDsmhQ1jCY6tGaPHnAibxCjTw24vKMJA8Xu4hGL7/5IRoHJ+OuGEcN4+g5RtshvAxP CDhw== X-Gm-Message-State: ACrzQf1efZEgqBUTc0EiQlOR2trW7M+qGDCwkXkYDT0cJl94Tnr6zC6i Ly3uhFe6PaSOCVcWjmnBFcf0BbzG8fk= X-Google-Smtp-Source: AMsMyM5iueP7SUwuOp5IbJvhlsYDu5MeiEt4+b+40Ognw2y0Z3pp5uIDfzI42VJGbbP8kWp5R5RVog== X-Received: by 2002:adf:a40c:0:b0:22e:47fe:7ea3 with SMTP id d12-20020adfa40c000000b0022e47fe7ea3mr567265wra.248.1665074382605; Thu, 06 Oct 2022 09:39:42 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id w3-20020a1cf603000000b003b95ed78275sm5592534wmc.20.2022.10.06.09.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 09:39:42 -0700 (PDT) From: zimoun Date: Thu, 6 Oct 2022 18:39:34 +0200 Message-Id: <20221006163935.2282212-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665077796; 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=5hd1zsUjzN4zgLFAE+R5oYL7ED+3i3nPHUYXzXElBAY=; b=sAP/XN6Io2fHozQO5rOz+6j6+PCH7vv+AoiXToKLxQBwgEjJe+J8GhjW39Q4HG9Z18sYgK TgatYE1ozP5DDIxySLTAASPRs03ijn31teJb2u7hUWNhDKGhSaRQdwaoJ+LaiFTAfr08Hn Pj4grCqS9NnbHHQErzr1ZeKKsqIT3jGXuM7Zt1CSmj6Ip+KquTd6/Hf3c5fH8eDPOiewAp EZkcbl59sHmr6n1sAC0mFNHgcTJ0GX773n+e5av9b1VMmN/UEPdfE0qu+/intt3D3XjIXG Vl4iEJCzGM7qL+rtEj4avKu4tLM1bSX6ZtgbpR8fYo7jDtezwKkT0kOjBn80/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665077796; a=rsa-sha256; cv=none; b=mAeQ+it/hwUeqlDam1i7pf0Vjzh1TIAWAwT30tZpS4jgd7NcEIzHKBZcPCFNhlRmy2nMWP qmNQmgB9xvyHihZBD7kW99q4NaQPw8f+UtAvhQAgP7xKEpHvbxAalrjClyyDNRIB1xieL4 9bF2JiD+gN82WbYNByB5k7zYHmM0O9WIrfsAtMs2GZGtFSoiHxQeoJd3uOoovHEGurymH9 W6RYZ4QczKuZ8aDn18pYtHG52/ENWhR200c/e3E4lu8YsJikYIX2LhfAhGKsiZBvA/IWYC GrdaI/AsyACZdvX20cA3vLo2gfmIyxVsF2dDJod6l+GMj00Ym7ZFTlP22/CYqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=L74f1rzZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 7.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=L74f1rzZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 21681B99C X-Spam-Score: 7.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: f4yDFKYeu6tr From: Efraim Flashner * gnu/packages/guix-extensions.scm (guix-hello): New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix-extensions. Co-authored-by: zimoun --- gnu/local.mk | 1 + gnu/packages/guix-extensions.scm | 60 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 gnu/packages/guix-extensions.scm diff --git a/gnu/local.mk b/gnu/local.mk index 5976cbe90c..7bf1c34995 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -299,6 +299,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/guile.scm \ %D%/packages/guile-wm.scm \ %D%/packages/guile-xyz.scm \ + %D%/packages/guix-extensions.scm \ %D%/packages/gv.scm \ %D%/packages/gxmessage.scm \ %D%/packages/hardware.scm \ diff --git a/gnu/packages/guix-extensions.scm b/gnu/packages/guix-extensions.scm new file mode 100644 index 0000000000..6294c15f3d --- /dev/null +++ b/gnu/packages/guix-extensions.scm @@ -0,0 +1,60 @@ +;;; Copyright © 2022 Efraim Flashner +;;; Copyright © 2022 Simon Tournier +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages guix-extensions) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base)) + +(define-public guix-hello + (package + (name "guix-hello") + (version "0") + (source #f) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((dest (string-append #$output + "/share/guix/extensions/hello.scm")) + (hello #$(this-package-input "hello"))) + (mkdir-p (dirname dest)) + (with-output-to-file dest + (lambda () + (format #t + "(define-module (guix extensions hello)~@ + #:use-module (guix scripts)~@ + #:export (guix-hello))~@ +~@ +(define-command (guix-hello . args)~@ + (category extension)~@ + (synopsis \"world\")~@ + (apply system* \"~a/bin/hello\" args))~%" + hello))))))) + (home-page "") ; Should be documentation location for GUIX_EXTENSIONS_PATH + (inputs + (list hello)) + (synopsis "Example of Guix sub-command extension") + (description "This Guix extension provides a shell redirection from +@code{guix hello} to @code{hello}.") + ;; The package definition is longer than the code; + ;; let this serve as the declaration of the license. + (license license:gpl3+))) -- 2.36.0