guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version.


From: Liliana Marie Prikler
Subject: [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version.
Date: Fri, 06 Dec 2024 22:19:08 +0100
User-agent: Evolution 3.48.4

Am Donnerstag, dem 05.12.2024 um 21:04 +0000 schrieb Greg Hogan:
> * gnu/packages/version-control.scm (git-sizer)
> [arguments]<#:phases>: Hard-code git path in 'fix-paths.
> [propagated-inputs]: Remove git.
> [inputs]: Add git-minimal/pinned.
> 
> Change-Id: Icc21f92e0261ff05f3411970e6f4792763a94f80
> ---
General note: when someone comments on your patch, don't forget to CC
them in upcoming revisions :)

>  gnu/packages/version-control.scm | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-
> control.scm
> index 37ee819688..8c7d817523 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -4468,10 +4468,13 @@ (define-public git-sizer
>        #~(modify-phases %standard-phases
>            (add-after 'unpack 'fix-paths
>              (lambda _
> -              (let ((git #$git))
> +              (let ((git #$git-minimal/pinned))
I'd rather avoid binding git per gexp here.
>                 (substitute* '("src/github.com/github/git-
> sizer/git_sizer_test.go")
>                   (("bin/git-sizer")
> -                  (string-append #$output "/bin/git-sizer"))))))
> +                  (string-append #$output "/bin/git-sizer")))
> +               (substitute* '("src/github.com/github/git-
> sizer/git/git.go")
> +                 (("gitBin, err := findGitBin\\(\\)")
> +                  (string-append "gitBin := \"" git
> "/bin/git\"\n\tvar err error"))))))
You can use (search-input-file …) instead.
>            (replace 'check
>              (lambda* (#:key tests? import-path #:allow-other-keys)
>                (when tests?
> @@ -4481,9 +4484,9 @@ (define-public git-sizer
>                            ;; Git repository.
>                            '("TestBomb" "TestFromSubdir"
> "TestRefgroups"
>                              "TestRefSelections"
> "TestTaggedTags"))))))))
> +    (inputs (list git-minimal/pinned))
>      (propagated-inputs
> -     (list git
> -           go-github-com-cli-safeexec
> +     (list go-github-com-cli-safeexec
>             go-github-com-davecgh-go-spew
>             go-github-com-pmezard-go-difflib
>             go-github-com-spf13-pflag
I don't see a good reason to move git first to propagated-inputs and
then to inputs.  I would squash this and 1/3 into one patch that
doesn't necessarily rely on G-Expressions in the middle :)

Cheers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]