all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Greg Hogan <code@greghogan.com>
To: 68829@debbugs.gnu.org
Cc: Greg Hogan <code@greghogan.com>
Subject: [bug#68829] [PATCH 3/3] gnu: Add git-sizer.
Date: Tue, 30 Jan 2024 20:08:06 +0000	[thread overview]
Message-ID: <ba86d4c5c7758c78df4667b3bb3163f5b25e2e5e.1706645122.git.code@greghogan.com> (raw)
In-Reply-To: <cover.1706645122.git.code@greghogan.com>

* gnu/packages/version-control.scm (git-sizer): New variable.

Change-Id: I82a61e364782dabfd59d0e81ff310fa916b5ff23
---
 gnu/packages/version-control.scm | 48 ++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index bed4c65c0a..33f9d87f34 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4000,3 +4000,51 @@ (define-public commit-patch
 comes as a command line app and also an Emacs interface.")
     (home-page "https://porkrind.org/commit-patch/")
     (license license:gpl2+)))
+
+(define-public git-sizer
+  (package
+    (name "git-sizer")
+    (version "1.5.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/github/git-sizer")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1b4sl4djnfaxwph41y4bh9yal4bpd1nz4403ryp7nzna7h2x0zis"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/github/git-sizer"
+       #:install-source? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-paths
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
+               (("bin/git-sizer")
+                (string-append (assoc-ref outputs "out")
+                               "/bin/git-sizer")))))
+         (replace 'check
+           (lambda* (#:key import-path #:allow-other-keys)
+             (for-each (lambda (test)
+                         (invoke "go" "test" "-v" "-run" test import-path))
+                       ;; TestExec and TestSubmodule require a copy of the Git repository.
+                       '("TestBomb" "TestFromSubdir" "TestRefgroups"
+                         "TestRefSelections" "TestTaggedTags")))))))
+    (native-inputs (list git))
+    (propagated-inputs
+     (list go-github-com-cli-safeexec
+           go-github-com-davecgh-go-spew
+           go-github-com-pmezard-go-difflib
+           go-github-com-spf13-pflag
+           go-github-com-stretchr-testify
+           go-go-uber-org-goleak
+           go-golang-org-x-sync
+           go-gopkg-in-yaml-v3))
+    (home-page "https://github.com/github/git-sizer")
+    (synopsis "Analyze size of a Git repo")
+    (description "Compute various size metrics for a Git repository, flagging
+those that might cause problems or inconvenience.")
+    (license license:expat)))
-- 
2.43.0





  parent reply	other threads:[~2024-01-30 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1706645122.git.code@greghogan.com>
2024-01-30 20:08 ` [bug#68829] [PATCH 1/3] gnu: Add go-github-com-cli-safeexec Greg Hogan
2024-01-30 20:08 ` [bug#68829] [PATCH 2/3] gnu: Add go-go-uber-org-goleak Greg Hogan
2024-01-30 20:08 ` Greg Hogan [this message]
2024-02-18 15:09   ` bug#68829: [PATCH 3/3] gnu: Add git-sizer Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba86d4c5c7758c78df4667b3bb3163f5b25e2e5e.1706645122.git.code@greghogan.com \
    --to=code@greghogan.com \
    --cc=68829@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.