From patchwork Mon May 29 14:35:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 50421 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 3EFFB27BBE9; Mon, 29 May 2023 15:36:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 708B127BBE2 for ; Mon, 29 May 2023 15:36:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3dyi-00083f-3n; Mon, 29 May 2023 10:36:08 -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 1q3dyc-00082v-EH for guix-patches@gnu.org; Mon, 29 May 2023 10:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3dyc-0008Rn-07 for guix-patches@gnu.org; Mon, 29 May 2023 10:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3dyb-00011V-Qn for guix-patches@gnu.org; Mon, 29 May 2023 10:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49581] [PATCH v5] gnu: Add git-issue. References: In-Reply-To: Resent-From: jlicht@fsfe.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 29 May 2023 14:36: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: 49581@debbugs.gnu.org Cc: Jelle Licht , phodina Received: via spool by 49581-submit@debbugs.gnu.org id=B49581.16853709493913 (code B ref 49581); Mon, 29 May 2023 14:36:01 +0000 Received: (at 49581) by debbugs.gnu.org; 29 May 2023 14:35:49 +0000 Received: from localhost ([127.0.0.1]:58699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3dyO-000113-BM for submit@debbugs.gnu.org; Mon, 29 May 2023 10:35:48 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:56664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3dyL-00010m-U9 for 49581@debbugs.gnu.org; Mon, 29 May 2023 10:35:47 -0400 From: jlicht@fsfe.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1685370942; 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: content-transfer-encoding:content-transfer-encoding; bh=SSBvfZDfHhWHE8gLTP+U2T4WBy3t8ll19vbB4+Lub3w=; b=uZMXrOkc8opmh4A4BGhHDhMOjVfYpMabs57CFndw97qUFAmlQN8t97Dc/etQYMhlCF9bmr PWVScYNoqn+VZrGe5KDz1YZr6D1CNO3zQWXFCBtxE5fDBcTM01qAYl/PTLjCkOZooTA18F /Qo3XhRLT/JUrkFs9/+SmRYVKljImPw= Date: Mon, 29 May 2023 16:35:42 +0200 Message-Id: <051ea586df11c135a2a535b6bfad3ab0b73b0e8e.1685370938.git.jlicht@fsfe.org> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: phodina * gnu/packages/version-control.scm (git-issue): New variable. Co-authored-by: Jelle Licht --- Changes in v5: - Update to latest commit of upstream - Use gexp-style inputs - Pass custom #:test-target instead of replacing check phase - Use search-input-file where possible - Autoload shellcheck to prevent module import cycle - Use user-installed git, instead of hardcoding reference gnu/packages/version-control.scm | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) base-commit: cf78f5b54975679df97c3015a541114d8278f417 diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 1db0931ac3..4eff59e516 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -42,6 +42,7 @@ ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 jgart +;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022 Jai Vetrivelan ;;; Copyright © 2022 Maxime Devos @@ -140,6 +141,8 @@ (define-module (gnu packages version-control) #:use-module (gnu packages textutils) #:use-module (gnu packages time) #:use-module (gnu packages tls) + ;; Using autoload to avoid a cycle. + #:autoload (gnu packages haskell-apps) (shellcheck) #:use-module (gnu packages) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -1365,6 +1368,71 @@ (define-public git-flow lot easier.") (license license:bsd-2))) +(define-public git-issue + (let ((commit "4d2bc4173bf803d74bf2ae54f892bd08754f1b48") + (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 + "0jmx8wjvvxkd3y5im2h96d13dnbpds66djf96b6s23jwfbr7dlsz")))) + (build-system gnu-build-system) + (arguments + (list + #:make-flags #~(list (string-append "PREFIX=" #$output)) + #:test-target "test" + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-before 'check 'setup-env + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (setenv "HOME" (getenv "TMPDIR")) + (invoke "git" "config" "--global" "user.email" "test") + (invoke "git" "config" "--global" "user.name" "Test") + (substitute* "test.sh" + (("! git diff") "false") + (("#!/bin/sh") + (string-append + "#!" + (search-input-file (or native-inputs inputs) "/bin/sh")))) + (substitute* "Makefile" + (("shellcheck -x") + "shellcheck --exclude=SC2001,SC2294,SC3043,SC3003 -x")))) + (add-after 'install 'patch-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((path (map + (lambda (program) + (dirname + (search-input-file inputs + (string-append "/bin/" program)))) + '("jq" "curl" "grep" "cat" "find")))) + (wrap-program (search-input-file outputs "bin/git-issue") + `("PATH" prefix ,path)))))))) + (native-inputs (list shellcheck git-minimal bash-minimal util-linux)) + (inputs (list bash-minimal + coreutils + curl + findutils + grep + jq + sed)) + (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")