gnu: gitless: Add bash-minimal to inputs, use gexps.

* gnu/packages/version-control.scm (gitless)
[arguments]: Use gexps.
[inputs]: Add bash-minimal.

Change-Id: I6f9c8661b739493ff48e114b6b063ecf12b8236a
This commit is contained in:
Maxim Cournoyer 2023-10-19 23:49:22 -04:00 committed by Ludovic Courtès
parent 70398d7473
commit 9185812a96
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -835,44 +835,43 @@ (define-public gitless
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases #~(list
(modify-phases %standard-phases #:phases
(add-before 'build 'loosen-requirements (modify-phases %standard-phases
(lambda _ (add-before 'build 'loosen-requirements
(substitute* "setup.py" (lambda _
;; Using Guix's python-pygit2 1.1.0 appears to work fine… (substitute* "setup.py"
(("pygit2==") "pygit2>=")) ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
#t)) (("pygit2==") "pygit2>="))))
(add-before 'check 'prepare-for-tests (add-before 'check 'prepare-for-tests
(lambda _ (lambda _
;; Find the 'gl' command. ;; Find the 'gl' command.
(rename-file "gl.py" "gl") (rename-file "gl.py" "gl")
(setenv "PATH" (string-append (getcwd) ":" (getenv "PATH"))) (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
;; The tests try to run git as if it were already set up. ;; The tests try to run git as if it were already set up.
(setenv "HOME" (getcwd)) (setenv "HOME" (getcwd))
(invoke "git" "config" "--global" "user.email" "git@example.com") (invoke "git" "config" "--global" "user.email" "git@example.com")
(invoke "git" "config" "--global" "user.name" "Guix"))) (invoke "git" "config" "--global" "user.name" "Guix")))
(replace 'wrap (replace 'wrap
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out #$output)
(git (assoc-ref inputs "git"))) (git (search-input-file inputs "bin/git")))
(wrap-program (string-append out "/bin/gl") (wrap-program (string-append out "/bin/gl")
`("PATH" ":" prefix (,(string-append git "/bin"))) `("PATH" ":" prefix (,(dirname git)))
`("GUIX_PYTHONPATH" ":" = `("GUIX_PYTHONPATH" ":" =
(,(string-append out "/lib/python" (,(string-append out "/lib/python"
,(version-major+minor #$(version-major+minor
(package-version python)) (package-version python))
"/site-packages:") "/site-packages:")
,(getenv "GUIX_PYTHONPATH")))) ,(getenv "GUIX_PYTHONPATH"))))))))))
#t)))))) (native-inputs (list git-minimal))
(native-inputs
`(("git-for-tests" ,git-minimal)))
(inputs (inputs
`(("git" ,git-minimal) (list bash-minimal
("python-clint" ,python-clint) git-minimal
("python-pygit2" ,python-pygit2) python-clint
("python-sh" ,python-sh))) python-pygit2
python-sh))
(home-page "https://gitless.com") (home-page "https://gitless.com")
(synopsis "Simple version control system built on top of Git") (synopsis "Simple version control system built on top of Git")
(description (description