1(define-module (nmeum packages zk)2 #:use-module (guix)3 #:use-module (guix build-system go)4 #:use-module (guix git-download)5 #:use-module ((guix licenses) #:prefix license:)6 #:use-module (gnu packages golang-build)7 #:use-module (gnu packages golang-check)8 #:use-module (gnu packages golang-web)9 #:use-module (gnu packages golang-xyz)10 #:use-module (gnu packages terminals))1112(define-public go-github-com-aymerick-raymond13 (package14 (name "go-github-com-aymerick-raymond")15 (version "2.0.2")16 (source17 (origin18 (method git-fetch)19 (uri (git-reference20 (url "https://github.com/aymerick/raymond")21 (commit (string-append "v" version))))22 (file-name (git-file-name name version))23 (sha25624 (base32 "0s5nxzx87a12hcdzhliy1j8albfx2jqddaks4m86yfrcawm6vndn"))))25 (build-system go-build-system)26 (arguments27 (list28 #:import-path "github.com/aymerick/raymond"29 #:phases30 #~(modify-phases %standard-phases31 ;; Replace vendored mustache version with the one from 'inputs'.32 (add-before 'check 'supply-mustache33 (lambda* (#:key inputs import-path #:allow-other-keys)34 (let ((mustache (string-append "src/" import-path "/mustache")))35 (delete-file-recursively mustache)36 (copy-recursively #$(this-package-input "mustache-specs")37 mustache)))))))38 (inputs `(("mustache-specs" ,(origin39 (method git-fetch)40 (uri (git-reference (url41 "https://github.com/mustache/spec")42 (commit43 "83b0721610a4e11832e83df19c73ace3289972b9")))44 (sha256 (base3245 "1g2f6hi04vkxrk53ixzm7yvkg5v8m00dh9nrkh9lxnx8aw824y80"))))))46 (propagated-inputs (list go-gopkg-in-yaml-v2))47 (home-page "https://github.com/aymerick/raymond")48 (synopsis "Handlebars for Go")49 (description50 "Provides a minimal templating engine for Go, inspired by the51Mustache-compatible Handlebars library from the Javascript ecosystem.")52 (license license:expat)))5354(define-public go-github-com-gosimple-slug55 (package56 (name "go-github-com-gosimple-slug")57 (version "1.12.0")58 (source59 (origin60 (method git-fetch)61 (uri (git-reference62 (url "https://github.com/gosimple/slug")63 (commit (string-append "v" version))))64 (file-name (git-file-name name version))65 (sha25666 (base32 "15gk6hdd8kjfl0srlf3gnjq34m64as1s6pjv7paaxd1zvrcml46y"))))67 (build-system go-build-system)68 (arguments69 (list70 #:import-path "github.com/gosimple/slug"))71 (propagated-inputs (list go-github-com-gosimple-unidecode))72 (home-page "https://github.com/gosimple/slug")73 (synopsis "URL-friendly slugify with multiple language support")74 (description "Generates slug from Unicode string for use in URLs.")75 (license license:mpl2.0)))7677(define-public go-github-com-mvdan-xurls78 (package79 (name "go-github-com-mvdan-xurls")80 (version "1.1.0")81 (source82 (origin83 (method git-fetch)84 (uri (git-reference85 (url "https://github.com/mvdan/xurls")86 (commit (string-append "v" version))))87 (file-name (git-file-name name version))88 (sha25689 (base32 "05q4nqbpgfb0a35sn22rn9mlag2ks4cgwb54dx925hipp6zgj1hx"))))90 (build-system go-build-system)91 (arguments92 (list93 #:import-path "github.com/mvdan/xurls"))94 (propagated-inputs (list go-golang-org-x-net))95 (home-page "https://github.com/mvdan/xurls")96 (synopsis "Extracts URLs from text")97 (description98 "Xurls extracts urls from plain text using regular expressions. It can99be used as both a binary and a library.")100 (license license:bsd-3)))101102(define-public go-github-com-alecthomas-kong-0.5.0103 (package104 (inherit go-github-com-alecthomas-kong)105 (name "go-github-com-alecthomas-kong")106 (version "0.5.0")107 (source108 (origin109 (method git-fetch)110 (uri (git-reference111 (url "https://github.com/alecthomas/kong")112 (commit (string-append "v" version))))113 (file-name (git-file-name name version))114 (sha256115 (base32 "1lk4nb8ilvy0l5szj4s6wnz716vlz0v253423ykmph5l6bmips1k"))))116 (arguments117 (list118 #:tests? #f119 #:import-path "github.com/alecthomas/kong"))120 (propagated-inputs (list go-github-com-alecthomas-repr121 go-github-com-pkg-errors))))122123(define-public go-github-com-fatih-color-1.13.0124 (package125 (inherit go-github-com-fatih-color)126 (name "go-github-com-fatih-color")127 (version "1.13.0")128 (source129 (origin130 (method git-fetch)131 (uri (git-reference132 (url "https://github.com/fatih/color")133 (commit (string-append "v" version))))134 (file-name (git-file-name name version))135 (sha256136 (base32 "029qkxsdpblhrpgbv4fcmqwkqnjhx08hwiqp19pd7zz6l8a373ay"))))137 (arguments138 (list139 #:import-path "github.com/fatih/color"140 #:test-flags141 #~(list "-vet=off")))))142143(define-public go-github-com-gosimple-unidecode144 (package145 (name "go-github-com-gosimple-unidecode")146 (version "1.0.1")147 (source148 (origin149 (method git-fetch)150 (uri (git-reference151 (url "https://github.com/gosimple/unidecode")152 (commit (string-append "v" version))))153 (file-name (git-file-name name version))154 (sha256155 (base32 "1dxdddn744l0s1lr006s2a4k02w6qx8j3k31c7sfflh7wvwzcdzx"))))156 (build-system go-build-system)157 (arguments158 (list159 #:import-path "github.com/gosimple/unidecode"))160 (home-page "https://github.com/gosimple/unidecode")161 (synopsis "Unicode transliterator for Go")162 (description163 "Package unidecode implements a unicode transliterator which164replaces non-ASCII characters with their ASCII approximations.")165 (license license:asl2.0)))166167(define-public go-github-com-rvflash-elapsed168 (package169 (name "go-github-com-rvflash-elapsed")170 (version "0.2.0")171 (source172 (origin173 (method git-fetch)174 (uri (git-reference175 (url "https://github.com/rvflash/elapsed")176 (commit (string-append "v" version))))177 (file-name (git-file-name name version))178 (sha256179 (base32 "1jawknvv51k1awlzpyr2qc1s75s1fg3l40c0zhixp1sc98hl434c"))))180 (build-system go-build-system)181 (arguments182 (list183 #:import-path "github.com/rvflash/elapsed"))184 (home-page "https://github.com/rvflash/elapsed")185 (synopsis "Calculates the elapsed time for a given date")186 (description "This package can be used to return the elapsed time since a187given time in a human-readable format.")188 (license license:expat)))189190(define-public go-github-com-tj-go-naturaldate191 (package192 (name "go-github-com-tj-go-naturaldate")193 (version "1.3.0")194 (source195 (origin196 (method git-fetch)197 (uri (git-reference198 (url "https://github.com/tj/go-naturaldate")199 (commit (string-append "v" version))))200 (file-name (git-file-name name version))201 (sha256202 (base32 "12d7nf1jd7nk9r8ifn1hr21a7m4yb1garmiw2grrsi5zsqsh2jb1"))))203 (build-system go-build-system)204 (arguments205 (list206 #:import-path "github.com/tj/go-naturaldate"))207 (propagated-inputs (list go-github-com-tj-assert))208 (home-page "https://github.com/tj/go-naturaldate")209 (synopsis "Provides natural date time parsing")210 (description211 "This package was designed for parsing human-friendly relative212date/time ranges.")213 (license license:expat)))214215(define-public go-github-com-tliron-kutil216 (package217 (name "go-github-com-tliron-kutil")218 (version "0.1.59")219 (source220 (origin221 (method git-fetch)222 (uri (git-reference223 (url "https://github.com/tliron/go-kutil")224 (commit (string-append "v" version))))225 (file-name (git-file-name name version))226 (sha256227 (base32 "07lhzgpsi96icdya874xmfd1ymg4s4y09s7m7h398aryn7hbysyg"))))228 (build-system go-build-system)229 (arguments230 (list231 #:skip-build? #t232 #:tests? #f ;TODO: requires packaging a lot of additional libraries.233 #:import-path "github.com/tliron/kutil"))234 (home-page "https://github.com/tliron/go-kutil")235 (synopsis "Utility library for Go")236 (description "This package provides a collection of Go utilities.")237 (license license:asl2.0)))238239(define-public go-github-com-tliron-glsp240 (package241 (name "go-github-com-tliron-glsp")242 (version "0.1.1")243 (source244 (origin245 (method git-fetch)246 (uri (git-reference247 (url "https://github.com/tliron/glsp")248 (commit (string-append "v" version))))249 (file-name (git-file-name name version))250 (sha256251 (base32 "0vz4idndpcxrkjck6m0azdg8zsgcxcchf0ldhnkr8fj3z2sllljr"))))252 (build-system go-build-system)253 (arguments254 (list255 #:import-path "github.com/tliron/glsp"))256 (propagated-inputs (list go-github-com-sasha-s-go-deadlock257 go-github-com-tliron-kutil258 go-github-com-sourcegraph-jsonrpc2259 go-github-com-pkg-errors260 go-github-com-gorilla-websocket261 go-golang-org-x-term262 go-golang-org-x-crypto263 go-github-com-zchee-color))264 (home-page "https://github.com/tliron/glsp")265 (synopsis "Language Server Protocol SDK for Go")266 (description267 "Implementation of the @acronym{LSP, language server protocol}268for Go, allowing the creating of custom language servers.")269 (license license:asl2.0)))270271(define-public go-github-com-yuin-goldmark-meta272 (package273 (name "go-github-com-yuin-goldmark-meta")274 (version "1.1.0")275 (source276 (origin277 (method git-fetch)278 (uri (git-reference279 (url "https://github.com/yuin/goldmark-meta")280 (commit (string-append "v" version))))281 (file-name (git-file-name name version))282 (sha256283 (base32 "07dnwpkcifk9lw25ncflwdzmp8xqwbsbq0bnw3v7ljz9i8zi3ya3"))))284 (build-system go-build-system)285 (arguments286 (list287 #:import-path "github.com/yuin/goldmark-meta"))288 (propagated-inputs (list go-gopkg-in-yaml-v2 go-github-com-yuin-goldmark))289 (home-page "https://github.com/yuin/goldmark-meta")290 (synopsis "YAML metadata extension for the goldmark markdown parser")291 (description292 "Extension for the @code{goldmark} markdown parser which enables293defining document metadata in the YAML format.")294 (license license:expat)))295296(define-public go-github-com-zchee-color297 (package298 (name "go-github-com-zchee-color")299 (version "2.0.6")300 (source301 (origin302 (method git-fetch)303 (uri (git-reference304 (url "https://github.com/zchee/color")305 (commit (string-append "v" version))))306 (file-name (git-file-name name version))307 (sha256308 (base32 "0im301c9m5702lsv3qvzwmx943m9hmrpb2670zfv0z14cm7fqhls"))))309 (build-system go-build-system)310 (arguments311 (list312 #:test-flags313 #~(list "-vet=off")314 #:import-path "github.com/zchee/color/v2"))315 (propagated-inputs (list go-github-com-mattn-go-isatty316 go-github-com-mattn-go-colorable))317 (home-page "https://github.com/zchee/color")318 (synopsis "Color package for Go")319 (description320 "Package color is an ANSI color package to output colorized or321SGR defined output to the standard output. The API can be used in several way,322pick one that suits you.")323 (license license:expat)))324325(define-public go-github-com-zk-org-pretty326 (package327 (name "go-github-com-zk-org-pretty")328 (version "0.2.4")329 (source330 (origin331 (method git-fetch)332 (uri (git-reference333 (url "https://github.com/zk-org/pretty")334 (commit (string-append "v" version))))335 (file-name (git-file-name name version))336 (sha256337 (base32 "086zcjamclnn3y9w4ww88ik9avwihbxk7h08vk7686643i1zij96"))))338 (build-system go-build-system)339 (arguments340 (list341 #:import-path "github.com/zk-org/pretty"))342 (propagated-inputs (list go-github-com-rogpeppe-go-internal343 go-github-com-kr-text))344 (home-page "https://github.com/zk-org/pretty")345 (synopsis "Pretty printing for Go values")346 (description "Provides a pretty printing library for Go values.")347 (license license:expat)))348349(define-public go-gopkg-in-djherbis-times-v1350 (package351 (name "go-gopkg-in-djherbis-times-v1")352 (version "1.3.0")353 (source354 (origin355 (method git-fetch)356 (uri (git-reference357 (url "https://github.com/djherbis/times")358 (commit (string-append "v" version))))359 (file-name (git-file-name name version))360 (sha256361 (base32 "1dk087l9c927f90zrsmyxxfx5i980r952qw47j9srq2q7dd0b4ni"))362 (modules '((guix build utils)))363 ;; Fix import path for itself in the example code (build by 'check).364 (snippet '(substitute* "example/main.go"365 (("github.com/djherbis/times")366 "gopkg.in/djherbis/times.v1")))))367 (build-system go-build-system)368 (arguments369 (list370 #:import-path "gopkg.in/djherbis/times.v1"))371 (home-page "https://github.com/djherbis/times")372 (synopsis "File times for Go")373 (description374 "This package allows access different file time metadata from Go.")375 (license license:expat)))376377(define-public zk378 (package379 (name "zk")380 (version "0.15.1")381 (source382 (origin383 (method git-fetch)384 (uri (git-reference385 (url "https://github.com/zk-org/zk/")386 (commit (string-append "v" version))))387 (file-name (git-file-name name version))388 (sha256389 (base32 "1jm18qp4sgfb92c420jc8ylfjwc6shv29fb1jc4z2g03dqcbg2l7"))390 (modules '((guix build utils)))391 (snippet392 ;; Remove the sqlite database tests as they require a dependency on393 ;; github.com/go-testfixtures/testfixtures/v3 which itself requires394 ;; several new dependencies to be added to Guix.395 #~(begin396 (for-each delete-file397 (find-files "internal/adapter/sqlite" ".*_test\\.go$"))))))398 (build-system go-build-system)399 (arguments400 (list401 #:install-source? #f402 #:import-path "github.com/zk-org/zk"403 #:test-flags404 #~(list "-vet=off" "-skip"405 (string-join (list406 ;; Test matches $HOME against the /etc/passwd entry.407 ;; Doesn't work on Guix because of HOME=/homeless-shelter.408 "TestExpandPath") "|"))409 #:phases410 #~(modify-phases %standard-phases411 (add-after 'unpack 'fix-paths412 (lambda* (#:key inputs import-path #:allow-other-keys)413 (substitute* (string-append "src/" import-path414 "/internal/adapter/fzf/fzf.go")415 (("\"fzf\"")416 (string-append417 "\"" (search-input-file inputs "/bin/fzf") "\""))))))))418 (inputs (list fzf))419 (propagated-inputs (list go-github-com-aymerick-raymond420 go-github-com-alecaivazis-survey-v2421 go-github-com-alecthomas-kong-0.5.0422 go-github-com-bmatcuk-doublestar-v4423 go-github-com-fatih-color-1.13.0424 go-github-com-google-go-cmp425 go-github-com-gosimple-slug426 go-github-com-kballard-go-shellquote427 go-github-com-lestrrat-go-strftime428 go-github-com-mattn-go-isatty429 go-github-com-mattn-go-sqlite3430 go-github-com-mvdan-xurls431 go-github-com-pelletier-go-toml432 go-github-com-pkg-errors433 go-github-com-relvacode-iso8601434 go-github-com-rvflash-elapsed435 go-github-com-schollz-progressbar-v3436 go-github-com-tj-go-naturaldate437 go-github-com-tliron-glsp438 go-github-com-tliron-kutil439 go-github-com-yuin-goldmark440 go-github-com-yuin-goldmark-meta441 go-github-com-zk-org-pretty442 go-gopkg-in-djherbis-times-v1443 go-github-com-alecaivazis-survey-v2))444 (home-page "https://zk-org.github.io/zk")445 (synopsis "Plain text note-taking assistant")446 (description447 "Command-line tooling for helping you to maintain a plain text448Zettelkasten or personal wiki. Based on the Markdown markup language.")449 (license license:gpl3)))