summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-02-07 23:27:32 +0000
committerAndreas Enge <andreas@enge.fr>2026-02-15 14:17:45 +0100
commitba09a68e0384e83af01cad0b8077a30a457a8988 (patch)
tree4b99fed5f3beab3e5d7392d94847a8d9670df63a /gnu
parent6c92691f9a6009558b2ccbf7872687b6106c2f92 (diff)
gnu: git-sizer: Improve style.
* gnu/packages/version-control.scm (git-sizer): Use G-expressions, fix indentation, move [propagated-inputs] to [native-inputs]. [arguments] <test-flags>: Move skipped tests here. <phases> Use default 'check phase. [inputs]: Remove git-minimal/pinned; add git-minimal. [propagated-inputs]: Remove 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, and go-gopkg-in-yaml-v3. [native-inputs]: Add go-github-com-cli-safeexec, 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, and go-gopkg-in-yaml-v3. Change-Id: Ia6e6331d3a789dbed5ad512b00623800c4bfeb27
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/version-control.scm71
1 files changed, 33 insertions, 38 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1a7cff2e811..4b3644b1984 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4761,45 +4761,39 @@ comes as a command line app and also an Emacs interface.")
(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"))))
+ (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 inputs outputs #:allow-other-keys)
- (substitute* '("src/github.com/github/git-sizer/git/git.go")
- (("gitBin, err := findGitBin\\(\\)")
- (string-append "gitBin := \""
- (search-input-file inputs "bin/git")
- "\"\n\tvar err error")))
- (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 tests? import-path #:allow-other-keys)
- (when tests?
- (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"))))))))
- (inputs (list git-minimal/pinned))
- (propagated-inputs
+ (list
+ #:install-source? #f
+ #:import-path "github.com/github/git-sizer"
+ #:test-flags
+ ;; TestExec and TestSubmodule require a copy of the Git repository.
+ #~(list "-skip" "TestExec|TestSubmodule")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("src/github.com/github/git-sizer/git/git.go")
+ (("gitBin, err := findGitBin\\(\\)")
+ (string-append "gitBin := \""
+ (search-input-file inputs "bin/git")
+ "\"\n\tvar err error")))
+ (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
+ (("bin/git-sizer")
+ (string-append #$output "/bin/git-sizer"))))))))
+ (inputs
+ (list git-minimal))
+ (native-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
@@ -4808,8 +4802,9 @@ comes as a command line app and also an Emacs interface.")
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.")
+ (description
+ "Compute various size metrics for a Git repository, flagging those that
+might cause problems or inconvenience.")
(license license:expat)))
;;;