From patchwork Mon Nov 1 20:21:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 34208 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 3A27F27BBE3; Mon, 1 Nov 2021 20:23:16 +0000 (GMT) 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, FREEMAIL_FROM,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 A22BF27BBE1 for ; Mon, 1 Nov 2021 20:23:15 +0000 (GMT) Received: from localhost ([::1]:55172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhdpq-0006il-FX for patchwork@mira.cbaines.net; Mon, 01 Nov 2021 16:23:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhdpe-0006gH-Vw for guix-patches@gnu.org; Mon, 01 Nov 2021 16:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhdpe-000165-N6 for guix-patches@gnu.org; Mon, 01 Nov 2021 16:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhdpe-0007dq-JW for guix-patches@gnu.org; Mon, 01 Nov 2021 16:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49581] [PATCH v4] gnu: Add git-issues. References: In-Reply-To: Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Nov 2021 20:23:02 +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: Sarah Morgensen Cc: Tobias Geerinckx-Rice , 49581@debbugs.gnu.org Received: via spool by 49581-submit@debbugs.gnu.org id=B49581.163579813029283 (code B ref 49581); Mon, 01 Nov 2021 20:23:02 +0000 Received: (at 49581) by debbugs.gnu.org; 1 Nov 2021 20:22:10 +0000 Received: from localhost ([127.0.0.1]:36234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhdog-0007c0-SA for submit@debbugs.gnu.org; Mon, 01 Nov 2021 16:22:09 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:11251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhdoc-0007bP-PC for 49581@debbugs.gnu.org; Mon, 01 Nov 2021 16:22:01 -0400 Date: Mon, 01 Nov 2021 20:21:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1635798108; bh=MCTsGRI1sYY6qZIciQpMkDmjabCW1texkQlu8IJ5Jn4=; h=Date:To:From:Cc:Reply-To:Subject:From; b=KV4uwvBp+IzVytJR0k7DWkCVN9F1QO+MiAnh+aUymJNx1RL0ElB/NkQJCBr+QhQLk jyYXAYoHYinSxhkijvC4pa6zZzAe8wW398ftjsQdA1vBFJbyuDy4XjIyVgEs6Zn/i2 Ry9xTQkwOQNU1ZLHqqXr0SxCJmiHWwtqTABi5hsc= Message-ID: MIME-Version: 1.0 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" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hi, Thanks Sarah for the feedback and tips on how to wrap the programs in the shell script. In fact the patch is almost done, but I couldn't figure out the correct procedure for the map on line 1324. I get that the list of strings should be mapped into paths to the binaries, but after struggling I gave up and found book about Scheme to learn first. So here is the patch with the minor issue. Hope this utility helps. --8<---------------cut here---------------start------------->8--- Subject: [PATCH v4] gnu: Add git-issue. * gnu/packages/version-control.scm (git-issue): New variable. --- 2.33.1 diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 064212db9f..c685f2f4b5 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -41,6 +41,7 @@ ;;; Copyright © 2021 François J. ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 jgart +;;; Copyright © 2021 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -96,6 +97,7 @@ (define-module (gnu packages version-control) #:use-module (gnu packages groff) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages haskell-apps) #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages mail) @@ -1277,6 +1279,75 @@ (define-public git-flow lot easier.") (license license:bsd-2))) +(define-public git-issue + (let ((commit "67aacad35888b4c51e2d7be35c86fef137874f12") + (revision "1")) + (package + (name "git-issue") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/dspinellis/git-issue") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1z6dpwbikmiq5acpbji4kvmxqc2jw995rfk5703k5mvp5ps9a29q")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-before 'check 'setup-env + (lambda _ + (setenv "HOME" (getenv "TMPDIR")) + (invoke "git" "config" "--global" "user.email" "test") + (invoke "git" "config" "--global" "user.name" "Test") + (substitute* "test.sh" + (("! git diff") "git diff") + (("#!/bin/sh") (string-append "#!" (which "bash"))) + (("gi=.*") (string-append "gi=" (getcwd) "/git-issue.sh\n"))) + (substitute* "Makefile" + (("shellcheck -x") "shellcheck --exclude=SC2001,SC3043,SC3003 -x")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "test")))) + (add-before 'install 'patch-paths + (lambda* (#:key build-inputs #:allow-other-keys) + (let ((out (assoc-ref %outputs "out")) + (paths (map + (lambda (input) + (string-append (assoc-ref build-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")))))))) + (native-inputs `(("shellcheck" ,shellcheck))) + (inputs `(("bash-minimal" ,bash-minimal) + ("git" ,git) + ("coreutils" ,coreutils) + ("grep" ,grep) + ("curl" ,curl) + ("findutils" ,findutils) + ("sed" ,sed) + ("util-linux" ,util-linux) + ("jq" ,jq))) + (synopsis "Git-based decentralized issue management") + (description "Git-issue provide a minimalist decentralized issue +management system based on Git, offering (optional) bidirectional +integration with GitHub and GitLab issue management.") + (home-page "https://github.com/dspinellis/git-issue") + (license license:gpl3+)))) + (define-public stgit (package (name "stgit")