pohjat/.guix/modules/data-gitea-markdown-package...

86 lines
2.8 KiB
Scheme

(define-module (data-gitea-markdown-package)
#:use-module (guix)
#:use-module (guix build-system haskell)
#:use-module (guix build-system go)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages golang)
#:use-module (gnu packages golang-check)
#: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)
(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))
(home-page "")
(synopsis "")
(description "")
(license license:agpl3+)))
(define go-chroma
(package
(inherit go-github-com-alecthomas-chroma)
(name "go-chroma")
(native-inputs
(list go-github-com-alecthomas-assert
go-github-com-alecthomas-kong
go-github-com-danwakefield-fnmatch
go-github-com-dlclark-regexp2
go-github-com-mattn-go-colorable
go-github-com-mattn-go-isatty))
(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)))