2023-11-20 10:11:28 +02:00
|
|
|
(define-module (data-gitea-markdown-package)
|
|
|
|
#:use-module (guix)
|
|
|
|
#:use-module (guix build-system haskell)
|
2023-11-22 18:30:44 +02:00
|
|
|
#:use-module (guix build-system go)
|
2023-11-20 10:11:28 +02:00
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module (guix git-download)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix packages)
|
2023-11-22 18:30:44 +02:00
|
|
|
#:use-module (gnu packages golang)
|
2024-11-28 12:39:21 +02:00
|
|
|
#:use-module (gnu packages golang-xyz)
|
2023-11-22 18:30:44 +02:00
|
|
|
#:use-module (gnu packages golang-check)
|
2023-11-20 10:11:28 +02:00
|
|
|
#:use-module (gnu packages haskell-web)
|
|
|
|
#:use-module (gnu packages haskell-xyz))
|
|
|
|
|
|
|
|
(define vcs-file?
|
|
|
|
(or (git-predicate (string-append (current-source-directory) "/../.."))
|
|
|
|
(const #t)))
|
|
|
|
|
|
|
|
(define-public data-gitea-markdown
|
|
|
|
(package
|
|
|
|
(name "data-gitea-markdown")
|
|
|
|
(version "0.0.1")
|
|
|
|
(source (local-file "../../gitea-markdown" "data-gitea-markdown"
|
|
|
|
#:recursive? #t
|
|
|
|
#:select? vcs-file?))
|
|
|
|
(build-system haskell-build-system)
|
2023-11-22 18:30:44 +02:00
|
|
|
(arguments
|
|
|
|
(list
|
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(add-after 'install 'wrap-binaries
|
|
|
|
(lambda _
|
|
|
|
(wrap-program
|
|
|
|
(string-append #$output "/bin/gitea-markdown")
|
|
|
|
`("PATH" = (,(string-append #$(this-package-input "go-chroma") "/bin")))))))))
|
|
|
|
(inputs
|
|
|
|
(list ghc-pandoc
|
|
|
|
ghc-pandoc-types
|
|
|
|
ghc-tagsoup
|
|
|
|
go-chroma))
|
2023-11-20 10:11:28 +02:00
|
|
|
(home-page "")
|
|
|
|
(synopsis "")
|
|
|
|
(description "")
|
|
|
|
(license license:agpl3+)))
|
2023-11-22 18:30:44 +02:00
|
|
|
|
|
|
|
(define go-chroma
|
|
|
|
(package
|
|
|
|
(inherit go-github-com-alecthomas-chroma)
|
|
|
|
(name "go-chroma")
|
|
|
|
(native-inputs
|
2024-11-28 12:39:21 +02:00
|
|
|
(list go-github-com-alecthomas-kong
|
|
|
|
go-github-com-stretchr-testify
|
2023-11-22 18:30:44 +02:00
|
|
|
go-github-com-dlclark-regexp2
|
|
|
|
go-github-com-mattn-go-colorable
|
2024-11-28 12:39:21 +02:00
|
|
|
go-github-com-mattn-go-isatty
|
|
|
|
))
|
2023-11-22 18:30:44 +02:00
|
|
|
(arguments
|
|
|
|
(list
|
|
|
|
#:import-path "github.com/alecthomas/chroma/cmd/chroma"
|
|
|
|
#:unpack-path "github.com/alecthomas/chroma"))))
|
|
|
|
|
|
|
|
(define-public go-github-com-alecthomas-kong
|
|
|
|
(package
|
|
|
|
(name "go-github-com-alecthomas-kong")
|
|
|
|
(version "0.2.4")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/alecthomas/kong")
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32 "0lv8xk71p5729igwmp6slhmf9x1g5z3zmkfx1mg1y2spn2ck4q7l"))))
|
|
|
|
(build-system go-build-system)
|
|
|
|
(arguments
|
|
|
|
'(#:import-path "github.com/alecthomas/kong"))
|
|
|
|
(propagated-inputs
|
|
|
|
(list go-github-com-pkg-errors
|
|
|
|
go-github-com-stretchr-testify))
|
|
|
|
(home-page "https://github.com/alecthomas/kong")
|
|
|
|
(synopsis "Kong is a command-line parser for Go")
|
|
|
|
(description
|
|
|
|
"Package kong aims to support arbitrarily complex command-line structures with as
|
|
|
|
little developer effort as possible.")
|
|
|
|
(license license:expat)))
|