851 lines
32 KiB
Scheme
851 lines
32 KiB
Scheme
(define-module (datarekisteri-package)
|
|
#:use-module (guix)
|
|
#:use-module (guix build-system go)
|
|
#:use-module (guix build-system haskell)
|
|
#: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-xyz)
|
|
#:use-module (gnu packages golang-compression)
|
|
#:use-module (gnu packages golang-check)
|
|
#:use-module (gnu packages syncthing)
|
|
#:use-module (gnu packages haskell)
|
|
#:use-module (gnu packages haskell-check)
|
|
#:use-module (gnu packages haskell-crypto)
|
|
#:use-module (gnu packages haskell-web)
|
|
#:use-module (gnu packages haskell-xyz)
|
|
#:use-module (srfi srfi-26))
|
|
|
|
(define vcs-file?
|
|
(or (and=> (and=> (current-source-directory)
|
|
(cut string-append <> "/../.."))
|
|
git-predicate)
|
|
(const #t)))
|
|
|
|
(define-public datarekisteri-backend
|
|
(package
|
|
(name "datarekisteri-backend")
|
|
(version "0.0.1")
|
|
(source (local-file "../../backend" "datarekisteri-backend-checkout"
|
|
#:recursive? #t
|
|
#:select? vcs-file?))
|
|
(build-system haskell-build-system)
|
|
(inputs (list dbmate
|
|
ghc-base64
|
|
ghc-cryptonite
|
|
ghc-datarekisteri-core
|
|
ghc-data-default
|
|
ghc-echo
|
|
ghc-email-validate
|
|
ghc-esqueleto
|
|
ghc-mime-mail
|
|
ghc-morpheus-graphql
|
|
ghc-optparse-applicative
|
|
ghc-persistent
|
|
ghc-persistent-postgresql
|
|
ghc-scotty
|
|
ghc-smtp-mail
|
|
ghc-unliftio-core
|
|
ghc-wai-cors
|
|
ghc-wai-extra))
|
|
(arguments
|
|
(list
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(add-after 'install 'wrap-binaries
|
|
(lambda _
|
|
(wrap-program
|
|
(string-append #$output "/bin/datarekisteri-backend")
|
|
`("PATH" prefix (,(string-append #$(this-package-input "dbmate") "/bin")))))))))
|
|
(home-page "")
|
|
(synopsis "")
|
|
(description "")
|
|
(license license:agpl3+)))
|
|
|
|
(define-public datarekisteri-frontend
|
|
(package
|
|
(name "datarekisteri-frontend")
|
|
(version "0.0.1")
|
|
(source (local-file "../../frontend" "datarekisteri-frontend-checkout"
|
|
#:recursive? #t
|
|
#:select? vcs-file?))
|
|
(build-system haskell-build-system)
|
|
(inputs (list dbmate
|
|
ghc-base64
|
|
ghc-cryptonite
|
|
ghc-datarekisteri-core
|
|
ghc-email-validate
|
|
ghc-esqueleto
|
|
ghc-mime-mail
|
|
ghc-morpheus-graphql
|
|
ghc-morpheus-graphql-client
|
|
ghc-optparse-applicative
|
|
ghc-persistent
|
|
ghc-persistent-postgresql
|
|
ghc-wai-extra
|
|
ghc-yesod
|
|
ghc-yesod-static
|
|
ghc-yesod-auth))
|
|
(home-page "")
|
|
(synopsis "")
|
|
(description "")
|
|
(license license:agpl3+)))
|
|
|
|
(define-public ghc-datarekisteri-core
|
|
(package
|
|
(name "datarekisteri-core")
|
|
(version "0.0.1")
|
|
(source (local-file "../../core" "datarekisteri-core-checkout"
|
|
#:recursive? #t
|
|
#:select? vcs-file?))
|
|
(build-system haskell-build-system)
|
|
(inputs (list ghc-base64
|
|
ghc-cryptonite
|
|
ghc-email-validate
|
|
ghc-mime-mail
|
|
ghc-morpheus-graphql
|
|
ghc-morpheus-graphql-client
|
|
ghc-persistent
|
|
ghc-persistent-postgresql))
|
|
(home-page "")
|
|
(synopsis "")
|
|
(description "")
|
|
(license license:agpl3+)))
|
|
|
|
|
|
(define-public ghc-mime-mail
|
|
(package
|
|
(name "ghc-mime-mail")
|
|
(version "0.5.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "mime-mail" version))
|
|
(sha256
|
|
(base32 "1s1wp8v1xlvw3r4qk1lv9zpm99ihka7a785zjl6i3fq1maqq955g"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "mime-mail")))
|
|
(inputs (list ghc-base64-bytestring ghc-random ghc-blaze-builder))
|
|
(native-inputs (list ghc-hspec hspec-discover))
|
|
(home-page "http://github.com/snoyberg/mime-mail")
|
|
(synopsis "Compose MIME email messages.")
|
|
(description
|
|
"Hackage documentation generation is not reliable. For up to date documentation,
|
|
please see: <http://www.stackage.org/package/mime-mail>.")
|
|
(license license:expat)))
|
|
|
|
|
|
(define-public ghc-smtp-mail
|
|
(package
|
|
(name "ghc-smtp-mail")
|
|
(version "0.5.0.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "smtp-mail" version))
|
|
(sha256
|
|
(base32 "1slmv6k47aqlnms1gjfvsjs1zw8fymvwb7j8nxpjkm554dxqzbcj"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "smtp-mail")))
|
|
(inputs (list ghc-base16-bytestring
|
|
ghc-base64-bytestring
|
|
ghc-crypton-connection
|
|
ghc-data-default-class
|
|
ghc-mime-mail
|
|
ghc-network
|
|
ghc-network-bsd
|
|
ghc-crypton
|
|
ghc-memory))
|
|
(arguments
|
|
`(#:cabal-revision ("1"
|
|
"0mjbrjgr7r42a9f45x4zg1zwij1v20d50x1p4g1s17v49s57hyg3")))
|
|
(home-page "http://github.com/haskell-github-trust/smtp-mail")
|
|
(synopsis "Simple email sending via SMTP")
|
|
(description
|
|
"This packages provides a simple interface for mail over SMTP. Please see the
|
|
README for more information.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public ghc-scotty
|
|
(package
|
|
(name "ghc-scotty")
|
|
(version "0.22")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "scotty" version))
|
|
(sha256
|
|
(base32 "075qnj3s1ddq337qcbrgwsc12rgjm1g5p755iaf67k824p0rifff"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "scotty")))
|
|
(inputs (list ghc-aeson
|
|
ghc-blaze-builder
|
|
ghc-case-insensitive
|
|
ghc-cookie
|
|
ghc-data-default-class
|
|
ghc-http-types
|
|
ghc-monad-control
|
|
ghc-network
|
|
ghc-regex-compat
|
|
ghc-resourcet
|
|
ghc-transformers-base
|
|
ghc-unliftio
|
|
ghc-wai
|
|
ghc-wai-extra
|
|
ghc-warp
|
|
ghc-fail
|
|
ghc-nats))
|
|
(native-inputs (list ghc-async
|
|
ghc-hspec
|
|
ghc-hspec-wai
|
|
ghc-lifted-base
|
|
ghc-doctest
|
|
ghc-http-client
|
|
hspec-discover))
|
|
(arguments
|
|
`(#:cabal-revision ("2"
|
|
"1m3qvb5q6yigw6ijxnp6h66rmyqg54619hb240s7cqc9qjrrkixk")))
|
|
(home-page "https://github.com/scotty-web/scotty")
|
|
(synopsis
|
|
"Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp")
|
|
(description
|
|
"This package provides a Haskell web framework inspired by Ruby's Sinatra, using
|
|
WAI and Warp. . @@ {-# LANGUAGE @code{OverloadedStrings} #-} .
|
|
import Web.Scotty . main = scotty 3000 $   get "/:word" $ do
|
|
    beam <- @code{pathParam} "word"
|
|
    html $ mconcat ["<h1>Scotty, ", beam, "
|
|
me up!</h1>"] @@ . . Scotty is the cheap and cheerful way to write
|
|
RESTful, declarative web applications. . * A page is as simple as defining the
|
|
verb, url pattern, and Text content. . * It is template-language agnostic.
|
|
Anything that returns a Text value will do. . * Conforms to WAI Application
|
|
interface. . * Uses very fast Warp webserver by default. . As for the name:
|
|
Sinatra + Warp = Scotty. . [WAI] <http://hackage.haskell.org/package/wai> .
|
|
[Warp] <http://hackage.haskell.org/package/warp>.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public ghc-authenticate
|
|
(package
|
|
(name "ghc-authenticate")
|
|
(version "1.3.5.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "authenticate" version))
|
|
(sha256
|
|
(base32 "1lsa5fgwxrz87l94d7whag2gpg0f3bxfn0244mi0byl6j5zpl0wp"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "authenticate")))
|
|
(inputs (list ghc-aeson
|
|
ghc-attoparsec-aeson
|
|
ghc-http-conduit
|
|
ghc-case-insensitive
|
|
ghc-http-types
|
|
ghc-xml-conduit
|
|
ghc-blaze-builder
|
|
ghc-attoparsec
|
|
ghc-unordered-containers
|
|
ghc-conduit
|
|
ghc-html-conduit
|
|
ghc-resourcet
|
|
ghc-network-uri))
|
|
(home-page "http://github.com/yesodweb/authenticate")
|
|
(synopsis "Authentication methods for Haskell web applications.")
|
|
(description "API docs and the README are available at
|
|
<http://www.stackage.org/package/authenticate>.")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-yesod-auth
|
|
(package
|
|
(name "ghc-yesod-auth")
|
|
(version "1.6.11.3")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "yesod-auth" version))
|
|
(sha256
|
|
(base32 "1qfzg4khdzrhzq78323648780divjllqrxn9hhzpnis61f0fwni8"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "yesod-auth")))
|
|
(inputs (list ghc-aeson
|
|
ghc-attoparsec-aeson
|
|
ghc-authenticate
|
|
ghc-base16-bytestring
|
|
ghc-base64-bytestring
|
|
ghc-blaze-builder
|
|
ghc-blaze-html
|
|
ghc-blaze-markup
|
|
ghc-conduit
|
|
ghc-conduit-extra
|
|
ghc-cryptonite
|
|
ghc-data-default
|
|
ghc-email-validate
|
|
ghc-file-embed
|
|
ghc-http-client
|
|
ghc-http-client-tls
|
|
ghc-http-conduit
|
|
ghc-http-types
|
|
ghc-memory
|
|
ghc-nonce
|
|
ghc-persistent
|
|
ghc-random
|
|
ghc-safe
|
|
ghc-shakespeare
|
|
ghc-unliftio
|
|
ghc-unliftio-core
|
|
ghc-unordered-containers
|
|
ghc-wai
|
|
ghc-yesod-core
|
|
ghc-yesod-form
|
|
ghc-yesod-persistent
|
|
ghc-network-uri))
|
|
(home-page "http://www.yesodweb.com/")
|
|
(synopsis "Authentication for Yesod.")
|
|
(description "API docs and the README are available at
|
|
<http://www.stackage.org/package/yesod-auth>.")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-wuss
|
|
(package
|
|
(name "ghc-wuss")
|
|
(version "2.0.2.7")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "wuss" version))
|
|
(sha256
|
|
(base32 "042pnniwn4kyb4d29zdh0284l497r1x393y5yw6jgigkvpdmpddb"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "wuss")))
|
|
(inputs (list ghc-crypton-connection ghc-data-default ghc-network
|
|
ghc-websockets))
|
|
(home-page "http://hackage.haskell.org/package/wuss")
|
|
(synopsis "Secure WebSocket (WSS) clients")
|
|
(description
|
|
"Wuss is a library that lets you easily create secure @code{WebSocket} clients
|
|
over the WSS protocol. It is a small addition to
|
|
<https://hackage.haskell.org/package/websockets the websockets package> and is
|
|
adapted from existing solutions by <https://gist.github.com/jaspervdj/7198388
|
|
@@jaspervdj>, <https://gist.github.com/mpickering/f1b7ba3190a4bb5884f3
|
|
@@mpickering>, and <https://gist.github.com/elfenlaid/7b5c28065e67e4cf0767
|
|
@@elfenlaid>.")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql-client
|
|
(package
|
|
(name "ghc-morpheus-graphql-client")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-client" version))
|
|
(sha256
|
|
(base32 "0l164jakzf0f351454hjdw6y8mccwj289ykjszq3n4rvcb67qi7l"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-client")))
|
|
(inputs (list ghc-aeson
|
|
ghc-file-embed
|
|
ghc-modern-uri
|
|
ghc-morpheus-graphql-code-gen-utils
|
|
ghc-morpheus-graphql-core
|
|
ghc-morpheus-graphql-subscriptions
|
|
ghc-prettyprinter
|
|
ghc-relude
|
|
ghc-req
|
|
ghc-unliftio-core
|
|
ghc-unordered-containers
|
|
ghc-websockets
|
|
ghc-wuss))
|
|
(native-inputs (list ghc-tasty ghc-tasty-hunit))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL Client")
|
|
(description
|
|
"Build @code{GraphQL} APIs with your favorite functional language!")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql-subscriptions
|
|
(package
|
|
(name "ghc-morpheus-graphql-subscriptions")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-subscriptions" version))
|
|
(sha256
|
|
(base32 "1zf1xai9b82768cc8z9q30snsnhggyi1xrsabww24mnbb1a3qsja"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-subscriptions")))
|
|
(inputs (list ghc-aeson
|
|
ghc-morpheus-graphql-app
|
|
ghc-morpheus-graphql-core
|
|
ghc-relude
|
|
ghc-unliftio-core
|
|
ghc-unordered-containers
|
|
ghc-uuid
|
|
ghc-websockets))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL Subscriptions")
|
|
(description
|
|
"Build @code{GraphQL} APIs with your favourite functional language!")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql-server
|
|
(package
|
|
(name "ghc-morpheus-graphql-server")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-server" version))
|
|
(sha256
|
|
(base32 "0yb6kbzbriqxhgr93jxaqg072n6ikdilhmwndkys9sq0l4adfp7k"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-server")))
|
|
(inputs (list ghc-aeson
|
|
ghc-file-embed
|
|
ghc-morpheus-graphql-app
|
|
ghc-morpheus-graphql-core
|
|
ghc-relude
|
|
ghc-unordered-containers
|
|
ghc-vector))
|
|
(native-inputs (list ghc-morpheus-graphql-subscriptions
|
|
ghc-morpheus-graphql-tests ghc-tasty ghc-tasty-hunit))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL")
|
|
(description
|
|
"Build @code{GraphQL} APIs with your favourite functional language!")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql-code-gen-utils
|
|
(package
|
|
(name "ghc-morpheus-graphql-code-gen-utils")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-code-gen-utils" version))
|
|
(sha256
|
|
(base32 "0yn2fblmain2hkgwvqdkghxh08w7h6aq6rf48pv6d6adn2ziis0q"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-code-gen-utils")))
|
|
(inputs (list ghc-morpheus-graphql-core ghc-prettyprinter ghc-relude
|
|
ghc-unordered-containers))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL CLI")
|
|
(description "code generator for Morpheus @code{GraphQL}.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public ghc-morpheus-graphql-code-gen
|
|
(package
|
|
(name "ghc-morpheus-graphql-code-gen")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-code-gen" version))
|
|
(sha256
|
|
(base32 "0bxjlk4bpk5yflrsvmp2jayfjwn3qqm098cva0cgshim06xfxyax"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-code-gen")))
|
|
(inputs (list ghc-file-embed
|
|
ghc-morpheus-graphql-code-gen-utils
|
|
ghc-morpheus-graphql-core
|
|
ghc-morpheus-graphql-server
|
|
ghc-prettyprinter
|
|
ghc-relude
|
|
ghc-unordered-containers
|
|
ghc-glob
|
|
ghc-morpheus-graphql-client
|
|
ghc-optparse-applicative
|
|
ghc-yaml))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL CLI")
|
|
(description "code generator for Morpheus @code{GraphQL}.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public ghc-morpheus-graphql-tests
|
|
(package
|
|
(name "ghc-morpheus-graphql-tests")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-tests" version))
|
|
(sha256
|
|
(base32 "04avy0rpw9md4dd5jjjr4px9z2jwgwfz3mywrdi6mq03sk57xysh"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-tests")))
|
|
(inputs (list ghc-aeson ghc-relude ghc-tasty ghc-tasty-hunit
|
|
ghc-unordered-containers))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL Test")
|
|
(description "test utils for morpheus graphql.")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-relude
|
|
(package
|
|
(name "ghc-relude")
|
|
(version "1.2.2.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "relude" version))
|
|
(sha256
|
|
(base32 "1865bladis4czglyvkcj05qh3fr2bvrm1w5dm5gz3wjs2cnsivci"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "relude")))
|
|
(arguments
|
|
(list
|
|
#:cabal-revision
|
|
'("3" "1zbx1xm4qdhjriyrdbyqflkymvpa9aafjb4jck61w5kmvjqqxplc")
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _
|
|
(setenv "GHC_PACKAGE_PATH"
|
|
(string-append (or (getenv "TMP") "/tmp")
|
|
"/package.conf.d"))
|
|
(invoke "./dist/build/relude-test/relude-test")
|
|
(invoke "./dist/build/relude-doctest/relude-doctest")
|
|
(unsetenv "GHC_PACKAGE_PATH"))))))
|
|
(inputs (list ghc-hashable ghc-unordered-containers))
|
|
(native-inputs (list ghc-hedgehog ghc-doctest ghc-glob))
|
|
(home-page "https://github.com/kowainik/relude")
|
|
(synopsis
|
|
"Safe, performant, user-friendly and lightweight Haskell Standard Library")
|
|
(description
|
|
"@@__relude__@@ is an alternative prelude library. If you find the default
|
|
@@Prelude@@ unsatisfying, despite its advantages, consider using @@relude@@
|
|
instead. == Relude goals and design principles * __Productivity.__ You can be
|
|
more productive with a \"non-standard\" standard library, and @@relude@@ helps you
|
|
with writing safer and more efficient code faster. * __Total programming__.
|
|
Usage of [/partial
|
|
functions/](https://www.reddit.com/r/haskell/comments/5n51u3/why_are_partial_functions_as_in_head_tail_bad/)
|
|
can lead to unexpected bugs and runtime exceptions in pure code. The types of
|
|
partial functions lie about their behaviour. And even if it is not always
|
|
possible to rely only on total functions, @@relude@@ strives to encourage
|
|
best-practices and reduce the chances of introducing a bug.
|
|
+---------------------------------+--------------------------------------------+
|
|
| __Partial__ | __Total__ |
|
|
+=================================+============================================+
|
|
| @@head :: [a] -> a@@ | @@head :: @code{NonEmpty} a -> a@@ |
|
|
+---------------------------------+--------------------------------------------+
|
|
| @@tail :: [a] -> [a]@@ | @@tail :: @code{NonEmpty} a -> [a]@@ |
|
|
+---------------------------------+--------------------------------------------+
|
|
| @@read :: Read a => String -> a@@ | @code{@@readMaybe} :: Read a => String ->
|
|
Maybe a@@ |
|
|
+---------------------------------+--------------------------------------------+
|
|
| @code{@@fromJust} :: Maybe a -> a@@ | @code{@@fromMaybe} :: a -> Maybe a ->
|
|
a@@ |
|
|
+---------------------------------+--------------------------------------------+
|
|
* __Type-safety__. We use the /\"make invalid states unrepresentable\"/ motto as
|
|
one of our guiding principles. If it is possible, we express this concept
|
|
through the types. /Example:/ @@ @code{whenNotNull} :: Applicative f => [a] ->
|
|
(@code{NonEmpty} a -> f ()) -> f () @@ * __Performance.__ We prefer @@Text@@
|
|
over
|
|
@@[String](https://www.reddit.com/r/haskell/comments/29jw0s/whats_wrong_with_string/)@@,
|
|
use space-leaks-free functions (e.g. our custom performant @@sum@@ and
|
|
@@product@@), introduce @@\\{\\-\\# INLINE \\#\\-\\}@@ and @@\\{\\-\\# SPECIALIZE
|
|
\\#\\-\\}@@ pragmas where appropriate, and make efficient container types (e.g.
|
|
@@Map@@, @code{@@HashMap}@@, @@Set@@) more accessible. * __Minimalism__ (low
|
|
number of dependencies). We do not force users of @@relude@@ to stick to any
|
|
specific lens or text formatting or logging library. Where possible, @@relude@@
|
|
depends only on boot libraries. The [Dependency
|
|
graph](https://raw.githubusercontent.com/kowainik/relude/main/relude-dependency-graph.png)
|
|
of @@relude@@ can give you a clearer picture. * __Convenience__. Despite
|
|
minimalism, we want to bring commonly used types and functions into scope, and
|
|
make available functions easier to use. Some examples of conveniences: 1. No
|
|
need to add @@containers@@, @@unordered-containers@@, @@text@@ and
|
|
@@bytestring@@ to dependencies in your @@.cabal@@ file to use the main API of
|
|
these libraries 2. No need to import types like @code{@@NonEmpty}@@, @@Text@@,
|
|
@@Set@@, @@Reader[T]@@, @@MVar@@, @@STM@@ 3. Functions like @code{@@liftIO}@@,
|
|
@code{@@fromMaybe}@@, @code{@@sortWith}@@ are available by default as well 4.
|
|
@@IO@@ actions are lifted to @code{@@MonadIO}@@ * __Excellent documentation.__
|
|
1. Tutorial 2. Migration guide from @@Prelude@@ 3. Haddock for every function
|
|
with examples tested by [doctest](http://hackage.haskell.org/package/doctest).
|
|
4. Documentation regarding [internal module
|
|
structure](http://hackage.haskell.org/package/relude/docs/Relude.html) 5.
|
|
@@relude@@-specific [HLint](http://hackage.haskell.org/package/hlint) rules:
|
|
@@[.hlint.yaml](https://github.com/kowainik/relude/blob/main/.hlint.yaml)@@ *
|
|
__User-friendliness.__ Anyone should be able to quickly migrate to @@relude@@.
|
|
Only some basic familiarity with the common libraries like @@text@@ and
|
|
@@containers@@ should be enough (but not necessary). * __Exploration.__ We have
|
|
space to experiment with new ideas and proposals without introducing breaking
|
|
changes. @@relude@@ uses the approach with @@Extra.*@@ modules which are not
|
|
exported by default. The chosen approach makes it quite easy for us to provide
|
|
new functionality without breaking anything and let the users decide to use it
|
|
or not.")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql-core
|
|
(package
|
|
(name "ghc-morpheus-graphql-core")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-core" version))
|
|
(sha256
|
|
(base32 "1595m4qcwbpz4zwa2jwcq7bgplxis2j69j3n24wcfs6pv1jlbbmj"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-core")))
|
|
(inputs (list ghc-aeson
|
|
ghc-hashable
|
|
ghc-megaparsec
|
|
ghc-relude
|
|
ghc-scientific
|
|
ghc-th-lift-instances
|
|
ghc-unordered-containers
|
|
ghc-vector))
|
|
(native-inputs (list ghc-morpheus-graphql-tests ghc-tasty ghc-tasty-hunit))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL Core")
|
|
(description
|
|
"Build @code{GraphQL} APIs with your favorite functional language!")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql-app
|
|
(package
|
|
(name "ghc-morpheus-graphql-app")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql-app" version))
|
|
(sha256
|
|
(base32 "156w5naxmda7hb4v107c8p1rzdqq53slf2nd393drsqd8qz7wv26"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql-app")))
|
|
(inputs (list ghc-aeson
|
|
ghc-attoparsec-aeson
|
|
ghc-hashable
|
|
ghc-megaparsec
|
|
ghc-morpheus-graphql-core
|
|
ghc-relude
|
|
ghc-scientific
|
|
ghc-th-lift-instances
|
|
ghc-unordered-containers
|
|
ghc-vector))
|
|
(native-inputs (list ghc-morpheus-graphql-tests ghc-tasty ghc-tasty-hunit))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL App")
|
|
(description
|
|
"Build @code{GraphQL} APIs with your favourite functional language!")
|
|
(license license:expat)))
|
|
|
|
(define-public ghc-morpheus-graphql
|
|
(package
|
|
(name "ghc-morpheus-graphql")
|
|
(version "0.28.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (hackage-uri "morpheus-graphql" version))
|
|
(sha256
|
|
(base32 "03srjbsirfkxfbk5sizixrqw7kyf9xfkhgxb4qxvhf8rh912i55x"))))
|
|
(build-system haskell-build-system)
|
|
(properties '((upstream-name . "morpheus-graphql")))
|
|
(inputs (list ghc-aeson
|
|
ghc-attoparsec-aeson
|
|
ghc-morpheus-graphql-app
|
|
ghc-morpheus-graphql-code-gen
|
|
ghc-morpheus-graphql-core
|
|
ghc-morpheus-graphql-server
|
|
ghc-relude
|
|
ghc-unordered-containers
|
|
ghc-vector))
|
|
(native-inputs (list ghc-morpheus-graphql-subscriptions
|
|
ghc-morpheus-graphql-tests ghc-tasty ghc-tasty-hunit))
|
|
(home-page "https://morpheusgraphql.com")
|
|
(synopsis "Morpheus GraphQL")
|
|
(description
|
|
"Build @code{GraphQL} APIs with your favourite functional language!")
|
|
(license license:expat)))
|
|
|
|
|
|
(define-public go-github-com-jmoiron-sqlx
|
|
(package
|
|
(name "go-github-com-jmoiron-sqlx")
|
|
(version "1.4.0")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/jmoiron/sqlx")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"10rg9b6cl1j7jjr6z95xa1k45016mhicii3cmz0pkwrxw3dpfzfh"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/jmoiron/sqlx"))
|
|
(propagated-inputs
|
|
(list go-github-com-mattn-go-sqlite3
|
|
go-github-com-lib-pq
|
|
go-github-com-go-sql-driver-mysql))
|
|
(home-page "https://github.com/jmoiron/sqlx")
|
|
(synopsis "sqlx")
|
|
(description
|
|
"Package sqlx provides general purpose extensions to database/sql.")
|
|
(license license:expat)))
|
|
|
|
(define-public go-github-com-bkaradzic-go-lz4
|
|
(package
|
|
(name "go-github-com-bkaradzic-go-lz4")
|
|
(version "1.0.0")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/bkaradzic/go-lz4")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "1vdid8v0c2v2qhrg9rzn3l7ya1h34jirrxfnir7gv7w6s4ivdvc1"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
(list
|
|
#:import-path "github.com/bkaradzic/go-lz4"))
|
|
(home-page "https://github.com/bkaradzic/go-lz4")
|
|
(synopsis "go-lz4")
|
|
(description
|
|
"go-lz4 is port of LZ4 lossless compression algorithm to Go. The original C code
|
|
is located at:.")
|
|
(license license:bsd-2)))
|
|
|
|
(define-public go-github-com-clickhouse-clickhouse-go
|
|
(package
|
|
(name "go-github-com-clickhouse-clickhouse-go")
|
|
(version "1.5.4")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/ClickHouse/clickhouse-go")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"15yf96mx3fkjyyasb8gjw6ml476k9qacp54bdjrb14pafz3p3rgf"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/ClickHouse/clickhouse-go"
|
|
#:tests? #f))
|
|
(propagated-inputs
|
|
(list go-github-com-stretchr-testify
|
|
go-github-com-pierrec-lz4
|
|
go-github-com-jmoiron-sqlx
|
|
go-github-com-cloudflare-golz4
|
|
go-github-com-bkaradzic-go-lz4))
|
|
(home-page "https://github.com/ClickHouse/clickhouse-go")
|
|
(synopsis "ClickHouse")
|
|
(description
|
|
"Golang SQL database driver for @url{https://clickhouse.yandex/,Yandex
|
|
ClickHouse}")
|
|
(license license:expat)))
|
|
|
|
(define-public go-github-com-joho-godotenv
|
|
(package
|
|
(name "go-github-com-joho-godotenv")
|
|
(version "1.5.1")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/joho/godotenv")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"03vijs05k31jdf24pzj3vlk6b5jxf894v1kvzals4wzclyq2h3ch"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/joho/godotenv"))
|
|
(home-page "https://github.com/joho/godotenv")
|
|
(synopsis "GoDotEnv")
|
|
(description
|
|
"Package godotenv is a go port of the ruby dotenv library
|
|
(@url{https://github.com/bkeepers/dotenv,https://github.com/bkeepers/dotenv})")
|
|
(license license:expat)))
|
|
|
|
(define-public go-github-com-zenizh-go-capturer
|
|
(package
|
|
(name "go-github-com-zenizh-go-capturer")
|
|
(version "0.0.0-20211219060012-52ea6c8fed04")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zenizh/go-capturer")
|
|
(commit (go-version->git-ref version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0zwz9gr1863z32gz9nyysg66mg124w6nql4m99g2dg6fbq2klda4"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/zenizh/go-capturer"))
|
|
(home-page "https://github.com/zenizh/go-capturer")
|
|
(synopsis "go-capturer")
|
|
(description
|
|
"Capture @code{os.Stdout} and/or @code{os.Stderr} in Go. This package is useful
|
|
for writing tests which print some outputs using @code{fmt} package.")
|
|
(license license:expat)))
|
|
|
|
(define-public go-github-com-cloudflare-golz4
|
|
(package
|
|
(name "go-github-com-cloudflare-golz4")
|
|
(version "0.0.0-20240916140612-caecf3c00c06")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/cloudflare/golz4")
|
|
(commit (go-version->git-ref version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"15nppvbav7kj3hh9qv9qbn15pd0c9lpljs5syl004cz6mif43as3"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/cloudflare/golz4"
|
|
#:tests? #f))
|
|
(home-page "https://github.com/cloudflare/golz4")
|
|
(synopsis "golz4")
|
|
(description "Package lz4 implements compression using lz4.c and lz4hc.c")
|
|
(license license:bsd-3)))
|
|
|
|
|
|
|
|
(define-public dbmate
|
|
(package
|
|
(name "dbmate")
|
|
(version "1.16.2")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/amacneil/dbmate")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0mp06dg8x19pkbl51k0b5xj7bamaj6f61fyi0cfbd1dldwzw0676"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/amacneil/dbmate"
|
|
#:tests? #f))
|
|
(propagated-inputs
|
|
(list go-github-com-zenizh-go-capturer
|
|
go-github-com-urfave-cli-v2
|
|
go-github-com-stretchr-testify
|
|
go-github-com-mattn-go-sqlite3
|
|
go-github-com-lib-pq
|
|
go-github-com-joho-godotenv
|
|
go-github-com-go-sql-driver-mysql
|
|
go-github-com-clickhouse-clickhouse-go))
|
|
(home-page "https://github.com/amacneil/dbmate")
|
|
(synopsis "Sql database migration tool")
|
|
(description
|
|
"Dbmate is a database migration tool, to keep your database schema in sync across
|
|
multiple developers and your production servers.")
|
|
(license license:expat)))
|
|
|
|
(list datarekisteri-backend datarekisteri-frontend ghc-datarekisteri-core)
|