mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: exercism: Improve package.
* gnu/packages/education.scm (exercism): Apply G-expressions. Move all inputs to native-inputs. Change-Id: I9fc0956a5403abb5d1dc1adaad1c35f6089bb67d
This commit is contained in:
parent
444f93ebf6
commit
0842b49f44
1 changed files with 35 additions and 29 deletions
|
@ -1121,36 +1121,41 @@ machine, and more.")
|
|||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0shh84g7j977kn9kcm09rj3lz6a3y5qq9yvklsldgb9zvass5szd"))
|
||||
(base32 "0shh84g7j977kn9kcm09rj3lz6a3y5qq9yvklsldgb9zvass5szd"))
|
||||
(patches (search-patches "exercism-disable-self-update.patch"))))
|
||||
(build-system go-build-system)
|
||||
(arguments
|
||||
`(#:import-path "github.com/exercism/cli/exercism"
|
||||
#:unpack-path "github.com/exercism/cli"
|
||||
#:install-source? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'install 'install-completions
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bash (string-append out "/etc/bash_completion.d/exercism"))
|
||||
(fish (string-append
|
||||
out "/share/fish/vendor_completions.d/exercism.fish"))
|
||||
(zsh (string-append out "/share/zsh/site-functions/_exercism")))
|
||||
(mkdir-p (dirname bash))
|
||||
(with-output-to-file bash
|
||||
(lambda ()
|
||||
(invoke (string-append out "/bin/exercism") "completion" "bash")))
|
||||
(mkdir-p (dirname fish))
|
||||
(with-output-to-file fish
|
||||
(lambda ()
|
||||
(invoke (string-append out "/bin/exercism") "completion" "fish")))
|
||||
(mkdir-p (dirname zsh))
|
||||
(with-output-to-file zsh
|
||||
(lambda ()
|
||||
(invoke (string-append out "/bin/exercism") "completion" "zsh")))))))))
|
||||
(inputs
|
||||
(list
|
||||
#:install-source? #f
|
||||
#:import-path "github.com/exercism/cli/exercism"
|
||||
#:unpack-path "github.com/exercism/cli"
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'install 'install-completions
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((exercism (string-append #$output "/bin/exercism"))
|
||||
(bash (string-append
|
||||
#$output
|
||||
"/etc/bash_completion.d/exercism"))
|
||||
(fish (string-append
|
||||
#$output
|
||||
"/share/fish/vendor_completions.d/exercism.fish"))
|
||||
(zsh (string-append
|
||||
#$output
|
||||
"/share/zsh/site-functions/_exercism")))
|
||||
(mkdir-p (dirname bash))
|
||||
(with-output-to-file bash
|
||||
(lambda ()
|
||||
(invoke exercism "completion" "bash")))
|
||||
(mkdir-p (dirname fish))
|
||||
(with-output-to-file fish
|
||||
(lambda ()
|
||||
(invoke exercism "completion" "fish")))
|
||||
(mkdir-p (dirname zsh))
|
||||
(with-output-to-file zsh
|
||||
(lambda ()
|
||||
(invoke exercism "completion" "zsh")))))))))
|
||||
(native-inputs
|
||||
(list go-github-com-blang-semver
|
||||
go-github-com-spf13-cobra
|
||||
go-github-com-spf13-pflag
|
||||
|
@ -1159,8 +1164,9 @@ machine, and more.")
|
|||
go-golang-org-x-text))
|
||||
(home-page "https://exercism.org/")
|
||||
(synopsis "Mentored learning for programming languages")
|
||||
(description "Commandline client for exercism.io, a free service providing
|
||||
mentored learning for programming languages.")
|
||||
(description
|
||||
"Commandline client for exercism.io, a free service providing mentored
|
||||
learning for programming languages.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public mazo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue