From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cMX4OuspTGHKBQAAgWs5BA (envelope-from ) for ; Thu, 23 Sep 2021 09:16:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MBiBNuspTGGgcAAAbx9fmQ (envelope-from ) for ; Thu, 23 Sep 2021 07:16:59 +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 A1A24875D for ; Thu, 23 Sep 2021 09:16:59 +0200 (CEST) Received: from localhost ([::1]:58242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTIyY-0006mM-Pz for larch@yhetil.org; Thu, 23 Sep 2021 03:16:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTIxe-0006I6-Ti for guix-patches@gnu.org; Thu, 23 Sep 2021 03:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTIxe-0006QV-5E for guix-patches@gnu.org; Thu, 23 Sep 2021 03:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTIxe-0000JQ-1b for guix-patches@gnu.org; Thu, 23 Sep 2021 03:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49581] [PATCH v3] gnu: Add git-issues. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Sep 2021 07:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49581 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: phodina Cc: Tobias Geerinckx-Rice , 49581@debbugs.gnu.org Received: via spool by 49581-submit@debbugs.gnu.org id=B49581.16323813581178 (code B ref 49581); Thu, 23 Sep 2021 07:16:01 +0000 Received: (at 49581) by debbugs.gnu.org; 23 Sep 2021 07:15:58 +0000 Received: from localhost ([127.0.0.1]:52542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTIxa-0000Iv-Cx for submit@debbugs.gnu.org; Thu, 23 Sep 2021 03:15:58 -0400 Received: from out2.migadu.com ([188.165.223.204]:40244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTIxX-0000Il-1R for 49581@debbugs.gnu.org; Thu, 23 Sep 2021 03:15:57 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1632381353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DBWzjp8fMwjGpvZe3Iuls7R/dZ6oGTiBrf3HaHy2Vyg=; b=IT2KTx6cPT4mKHKshwCJcyRH9aeNfalJ3oKHQRLT4WyTNK62ynxgjXkCVra5TTwq2GVoKT 8TKL2IZa0pU0a+hoPfqnXnIF4OqBDN1/sXX+wZr8ZmDPJVyWJQs5iYws5orWvzHZ6jigeX 7Rt6Jap9n/yy7NJTqVu10F8MKXJGLIQ= From: Sarah Morgensen References: <86v92sw942.fsf@mgsn.dev> Date: Thu, 23 Sep 2021 00:15:50 -0700 In-Reply-To: <86v92sw942.fsf@mgsn.dev> (Sarah Morgensen's message of "Wed, 22 Sep 2021 15:14:53 -0700 (7 hours, 33 minutes, 32 seconds ago)") Message-ID: <86ilyrwymx.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain 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=1632381419; 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: dkim-signature; bh=DBWzjp8fMwjGpvZe3Iuls7R/dZ6oGTiBrf3HaHy2Vyg=; b=NyfQGB9rljQ8VVX9cm5FSBSm1Izm1d5TGlCafZmSHTvfR9mULl6i70FooL0uIyIjkVAn1J eY6TgI4duPeaYMTZTlTnZAJdHWlwXVvuBDr7rNCo2igBL41AsDNxD04PqFm09miUnwujhl GRXhH2yknyOKvF+K8mQTwIBJCqjpG7Q6+wU2rSwFQCWShbHsNxdDBdY7NfyaGD0oYGi4vA RyCs3zT0HnO/ar0/f1E4jst1A+As8Wn5Kf/XABNNtp/Jr4x4hTgJAFqB3jdoWkA0zND7g/ w8bFGMt6O1FNr4Su/yNMCOAvjC8PDYWjqxBzYc9t7OYXO4PkQi7ESJUOrAcdPg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632381419; a=rsa-sha256; cv=none; b=ggSqyKnIvcnUpVu4S2QDj0c4aUZ5l+gpChN+JNBLJkXv33nZZNCb1qUThS033j+VmjJbVy N00BJ3k/ZYfVMVK0oZVUTNzvxw5PTGO5xYI8ocByN/U3HJGamencVd6t13oPe1oS5Ds6dZ KznYXKoJdQaVprZz11IN99Ce1cD/3YcUt1O6ETztKjTHpCSpg/L28EY/NQwo2yQF+40+YJ eUfTbTwNpjL2FSGpDmeCMVIx9BJqhwKK5N9D86hVU9dKeWWnRdfzKKy8WLht/qLBFVHTN8 eiLNWvXsU1nUx6KR2mQwTePiuu/tzXo2UXnjPRHJgwebqvUC8OcSEzdZx9Zrcw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=IT2KTx6c; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (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.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=IT2KTx6c; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (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: A1A24875D X-Spam-Score: -1.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ayg/jlE8Uo2Z Hi again, Sarah Morgensen writes: > Additionally, it looks like git-issue depends on several tools: cat, > curl, grep, git, find, jq, and sed, at least. These should probably be > included in inputs and substituted in the script, perhaps with: > > (add-before 'install 'patch-paths > (lambda* (#:key inputs #:allow-other-keys) > (define (input-file input file) > (string-append (assoc-ref inputs input) "/" file)) > > (substitute* '("git-issue.sh" > "lib/git-issue/import-export.sh" > "scripts/replacerefs.sh") > (("\\bcat\\b") (input-file "coreutils" "bin/cat")) > (("\\bcurl\\b") (input-file "curl" "bin/curl")) > (("\\bdate\\b") (input-file "coreutils" "bin/date")) > (("\\bgit\\b") (input-file "git-minimal" "bin/git")) > (("\\bgrep\\b") (input-file "grep" "bin/grep")) > (("\\bfind\\b") (input-file "findutils" "bin/find")) > (("\\bjq\\b") (input-file "jq" "bin/jq")) > (("\\bsed\\b") (input-file "sed" "bin/sed")) > ;; Substitute back any usage examples. > (("((usage|Example): )/gnu/store/[^/]+/bin/(\\w+)" > all start exec) > (string-append start exec))))) > > I may have missed a few utilities, though. I belatedly realized you could also use 'wrap-program', which is probably less error-prone. For example (untested, and not very pretty): --8<---------------cut here---------------start------------->8--- (let ((out (assoc-ref outputs "out")) (paths (map (lambda (input) (string-append (assoc-ref inputs input) "/bin")) '("coreutils" "curl" "findutils" "git-minimal" "grep" "jq" "sed"))) (for-each (lambda (program) (wrap-program (string-append out "/" program) `("PATH" prefix ,paths))) '("bin/git-issue" "lib/git-issue/import-export.sh")))) --8<---------------cut here---------------end--------------->8--- Thinking about it, I'm not sure if the bash autocompletion script ("etc/bash_completion.d/git-issue") should be wrapped as well. Hope that helps, -- Sarah