tiedote.md/.guix/modules/tiedote-md-package.scm

522 lines
21 KiB
Scheme

(define-module (tiedote-md-package)
#:use-module (guix)
#: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 haskell)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages haskell-crypto)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-web)
#:use-module (gnu packages golang-web)
#:use-module (gnu packages ssh)
#:use-module (gnu packages version-control))
(define vcs-file?
(or (and=> (current-source-directory)
(lambda (dir)
(git-predicate (string-append dir "/../.."))))
(const #t)))
(define tiedote-md*
(package
(name "tiedote-md")
(version "0.0.1-git")
(source (local-file "../.." "tiedote-md-checkout"
#:recursive? #t
#:select? vcs-file?))
(build-system haskell-build-system)
(inputs (list ghc-acid-state
ghc-attoparsec
ghc-base64
ghc-crypton
ghc-case-insensitive
ghc-glob
ghc-purebred-email
ghc-optparse-applicative
ghc-filestore
ghc-hostname
ghc-pandoc
ghc-file-embed
ghc-safecopy
ghc-scotty
ghc-exit-codes
git
openssh-sans-x
go-github-com-aymerick-douceur))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'wrap-binaries
(lambda* (#:key inputs #:allow-other-keys)
(wrap-program
(string-append #$output "/bin/tiedote.md")
`("PATH" prefix (,(string-append (assoc-ref inputs "git") "/bin")
,(string-append (assoc-ref inputs "openssh-sans-x") "/bin")
,(string-append (assoc-ref inputs "go-github-com-aymerick-douceur")
"/bin")))))))))
(home-page "https://git.olarinmaensamoojat.fi/OMS/tiedote.md")
(synopsis "Git- ja markdown-pohjainen masssasähköpostijärjestelmä OMS:lle")
(description
"Tiedote.md on massasähköpostijärjestelmä, joka käyttää
massasähköpostien hallintaan git-tietovarastossa olevia markdown-tiedostoja ja
sähköpostipohjaista käyttöliittymää. Toistaiseksi tiedote.md on kovakoodattu
käyttämään OMS:n tiedotepohjia.")
(license license:agpl3+)))
(define ghc-template-haskell-lift
(package
(name "ghc-template-haskell-lift")
(version "0.1.0.0")
(source
(origin
(method url-fetch)
(uri (hackage-uri "template-haskell-lift" version))
(sha256
(base32 "09zilw0nbjmn1k688l058183rwa3br0fvh3x8jxqygjh3011w8ps"))))
(build-system haskell-build-system)
(properties '((upstream-name . "template-haskell-lift")))
(arguments
`(#:cabal-revision ("1"
"072g7a9b2sp0vc3g48xqbrxfis1rizqakz0b8064hs0cbgj3xkgn")))
(home-page "http://hackage.haskell.org/package/template-haskell-lift")
(synopsis "The 'Lift' typeclass.")
(description
"The stable home of @code{TemplateHaskell's} Lift typeclass, which implements
cross-stage persistence for Template Haskell.")
(license license:bsd-2)))
(define ghc-doclayout*
(package
(inherit ghc-doclayout)
(source
(origin
(inherit (package-source ghc-doclayout))
(patches
(list (local-file "../patches/ghc-doclayout-add-lift-instance.patch")))))
(inputs (modify-inputs (package-inputs ghc-doclayout)
(append ghc-template-haskell-lift)))))
(define-public tiedote-md
((package-input-rewriting `((,ghc-doclayout . ,ghc-doclayout*)))
tiedote-md*))
(define ghc-acid-state
(package
(name "ghc-acid-state")
(version "0.16.1.4")
(source
(origin
(method url-fetch)
(uri (hackage-uri "acid-state" version))
(sha256
(base32 "1z3q0d83dmdhr2s0bh4vhlyz82wik3w8gdmqs5mxk6kw6g7f0xzl"))))
(build-system haskell-build-system)
(properties '((upstream-name . "acid-state")))
(inputs (list ghc-cereal
ghc-safecopy
ghc-filelock
ghc-network
ghc-network-bsd
ghc-th-expand-syns))
(native-inputs (list hspec-discover ghc-hspec ghc-hedgehog))
(home-page "https://github.com/acid-state/acid-state")
(synopsis
"Add ACID guarantees to any serializable Haskell data structure.")
(description
"Use regular Haskell data structures as your database and get stronger ACID
guarantees than most RDBMS offer.")
(license license:public-domain)))
(define ghc-ap-normalize
(package
(name "ghc-ap-normalize")
(version "0.1.0.1")
(source
(origin
(method url-fetch)
(uri (hackage-uri "ap-normalize" version))
(sha256
(base32 "1212zxc4qn6msk0w13yhrza2qjs79h78misllb4chng75jqi61l2"))))
(build-system haskell-build-system)
(properties '((upstream-name . "ap-normalize")))
(arguments (list #:tests? #f))
(home-page "http://hackage.haskell.org/package/ap-normalize")
(synopsis "Self-normalizing applicative expressions")
(description
"An applicative functor transformer to normalize expressions using @@(\\<$>)@@,
@@(\\<*>)@@, and @@pure@@ into a linear list of actions. See
\"@code{ApNormalize}\" to get started.")
(license license:expat)))
(define ghc-concise
(package
(name "ghc-concise")
(version "0.1.0.1")
(source
(origin
(method url-fetch)
(uri (hackage-uri "concise" version))
(sha256
(base32 "09crgc6gjfidlad6263253xx1di6wfhc9awhira21s0z7rddy9sw"))))
(build-system haskell-build-system)
(properties '((upstream-name . "concise")))
(inputs (list ghc-lens))
(native-inputs (list ghc-tasty ghc-tasty-quickcheck ghc-quickcheck
ghc-quickcheck-instances))
(home-page "https://github.com/frasertweedale/hs-concise")
(synopsis "Utilities for Control.Lens.Cons")
(description
"concise provides a handful of functions to extend what you can do with
Control.Lens.Cons.")
(license license:bsd-3)))
(define ghc-exit-codes
(package
(name "ghc-exit-codes")
(version "1.0.0")
(source
(origin
(method url-fetch)
(uri (hackage-uri "exit-codes" version))
(sha256
(base32 "00cyli96zkyqhjr3lqzrislqyk72xwm2dcqvjagklidh32d4k8ja"))))
(build-system haskell-build-system)
(properties '((upstream-name . "exit-codes")))
(home-page "http://github.com/JustusAdam/exit-codes")
(synopsis "Exit codes as defined by BSD")
(description
"Expose the exit codes defined by BSD in sysexits.h to the Haskell world.")
(license license:bsd-3)))
(define ghc-filestore
(package
(name "ghc-filestore")
(version "0.6.5.1")
(source
(origin
(method url-fetch)
(uri (hackage-uri "filestore" version))
(sha256
(base32 "1m6rav1rcigckakw8ky27lbwh5a9q8xl7nvv358ljykmvyl1j2lc"))))
(build-system haskell-build-system)
(properties '((upstream-name . "filestore")))
(inputs (list ghc-utf8-string ghc-xml ghc-split ghc-diff ghc-old-locale))
(native-inputs (list ghc-hunit git-minimal/pinned mercurial))
(home-page "http://hackage.haskell.org/package/filestore")
(synopsis "Interface for versioning file stores.")
(description
"The filestore library provides an abstract interface for a versioning file
store, and modules that instantiate this interface. Currently Git, Darcs, and
Mercurial modules are provided, and other VCSs or databases could be added.")
(license license:bsd-3)))
(define ghc-generic-data
(package
(name "ghc-generic-data")
(version "1.1.0.2")
(source
(origin
(method url-fetch)
(uri (hackage-uri "generic-data" version))
(sha256
(base32 "1dfs728nbkilzfmdk6gnjk7wdk1habqn35pb071zcmcp8ll0lzpj"))))
(build-system haskell-build-system)
(properties '((upstream-name . "generic-data")))
(inputs (list ghc-ap-normalize ghc-base-orphans ghc-show-combinators
ghc-contravariant))
(native-inputs (list ghc-generic-lens
ghc-tasty
ghc-tasty-hunit
ghc-one-liner))
(arguments
`(#:cabal-revision ("1"
"0f2aijk70cb01p8yzbg5jq4gawnaryg8qnb1jx4xx92mfmn673p8")))
(home-page "https://github.com/Lysxia/generic-data#readme")
(synopsis "Deriving instances with GHC.Generics and related utilities")
(description
"Generic implementations of standard type classes. Operations on generic
representations to help using \"GHC.Generics\". See README.")
(license license:expat)))
(define ghc-lens-action
(package
(name "ghc-lens-action")
(version "0.2.6")
(source
(origin
(method url-fetch)
(uri (hackage-uri "lens-action" version))
(sha256
(base32 "0cdprc5j6r976dmrga2zwvcr7qsv7nqy3nvncp66yyy0dk2qlwm3"))))
(build-system haskell-build-system)
(properties '((upstream-name . "lens-action")))
(inputs (list ghc-lens ghc-comonad ghc-contravariant ghc-profunctors
ghc-semigroupoids))
(arguments
`(#:cabal-revision ("2"
"0rrrv7k0fz98j99a6gzw858v5w3i378g0b7ijj30dz2am6p6rfnm")))
(home-page "http://github.com/ekmett/lens-action/")
(synopsis "Monadic Getters and Folds")
(description
"This package contains combinators and types for working with monadic getters and
folds as split off from the original lens package.")
(license license:bsd-3)))
(define ghc-linear-base
(package
(name "ghc-linear-base")
(version "0.5.0")
(source
(origin
(method url-fetch)
(uri (hackage-uri "linear-base" version))
(sha256
(base32 "0iikqp73i0isxkd8xwg5f8f6dk3cv5iw6ifjkmp5r5kwxb650xgq"))))
(build-system haskell-build-system)
(properties '((upstream-name . "linear-base")))
(inputs (list ghc-hashable ghc-linear-generics ghc-storable-tuple
ghc-vector ghc-primitive))
(native-inputs (list ghc-inspection-testing
ghc-tasty-inspection-testing
ghc-tasty
ghc-tasty-hedgehog
ghc-mmorph
ghc-hedgehog))
(home-page "https://github.com/tweag/linear-base#README")
(synopsis "Standard library for linear types.")
(description "Please see README.md.")
(license license:expat)))
(define ghc-linear-generics
(package
(name "ghc-linear-generics")
(version "0.2.3")
(source
(origin
(method url-fetch)
(uri (hackage-uri "linear-generics" version))
(sha256
(base32 "0093ywl8s8k92b50li28gcmqc616f6l7jkv7vslkvqzn42yrvbq2"))))
(build-system haskell-build-system)
(properties '((upstream-name . "linear-generics")))
(inputs (list ghc-th-abstraction))
(native-inputs (list hspec-discover ghc-hspec))
(arguments
`(#:cabal-revision ("4"
"1wxb2r70bn1rhs771jlq08q1wvaf7risn6y931snaxa0xwi6a4zq")))
(home-page "https://github.com/linear-generics/linear-generics")
(synopsis "Generic programming library for generalised deriving.")
(description
"This package offers a version of
<https://hackage.haskell.org/package/base/docs/GHC-Generics.html GHC.Generics>
with two important improvements: . 1. The @@to@@, @@from@@, @@to1@@, and
@@from1@@ methods have multiplicity-polymorphic types, allowing them to be used
with either traditional Haskell code or linearly typed code. . 2. The
representations used for @@Generic1@@ are modified slightly. As a result,
@@to1@@ and @@from1@@ never need to use @@fmap@@. This can
<https://gitlab.haskell.org/ghc/ghc/-/issues/15969 greatly improve performance>,
and it is <https://github.com/tweag/linear-base/pull/316 necessary to support
multiplicity polymorphism>. A smaller change, approximately
<https://gitlab.haskell.org/ghc/ghc/-/issues/7492 as proposed by spl>, reduces
the number of instances that must be written to actually use @@Generic1@@ for
deriving instances of other classes. . For more details, see the
\"Generics.Linear\" documentation. . The implementation is based on the
@@generic-deriving@@ package, first described in the paper . * /A generic
deriving mechanism for Haskell/. Jose Pedro Magalhaes, Atze Dijkstra, Johan
Jeuring, and Andres Loeh. Haskell'10. . This library is organized as follows:
. * \"Generics.Linear\" defines the core functionality for generics, including the
multiplicity-polymorphic @@Generic(1)@@ classes and a replacement for the
@@:.:@@ composition type. . * \"Generics.Linear.TH\" implements Template Haskell
functionality for deriving instances of @@Generic(1)@@. . *
\"Generics.Linear.Unsafe.@code{ViaGHCGenerics}\" offers @code{@@DerivingVia}@@
targets to derive @@Generic@@ and @@Generic1@@ instances from
@@\"GHC.Generics\".'GHC.Generics.Generic'@@. Because these instances necessarily
use unsafe coercions, their use will likely inhibit full optimization of code
using them. . Educational code: the educational modules exported by
<https://hackage.haskell.org/package/generic-deriving generic-deriving> have
been copied into the @@tests\\/Generic\\/Deriving@@ directory in this repository,
with the very few modifications required to accommodate the differences between
the @@Generic1@@ representations here and in @@base@@. All the same caveats
apply as in the originals; see that package's @@README@@.")
(license license:bsd-3)))
(define ghc-one-liner
(package
(name "ghc-one-liner")
(version "2.1")
(source
(origin
(method url-fetch)
(uri (hackage-uri "one-liner" version))
(sha256
(base32 "09gdivd38disddxs42179vmgca0yzk5dfm6ygicgl5l25qbizrfh"))))
(build-system haskell-build-system)
(properties '((upstream-name . "one-liner")))
(inputs (list ghc-contravariant ghc-bifunctors ghc-profunctors ghc-tagged
ghc-linear-base))
(native-inputs (list ghc-hunit))
(arguments
`(#:cabal-revision ("1"
"1n6d74s0x91qi4fi6wv5yggjb1nvwk0ir580mkf67bca2x6f1cqn")))
(home-page "https://github.com/sjoerdvisscher/one-liner")
(synopsis "Constraint-based generics")
(description
"Write short and concise generic instances of type classes. one-liner is
particularly useful for writing default implementations of type class methods.")
(license license:bsd-3)))
(define ghc-purebred-email
(package
(name "ghc-purebred-email")
(version "0.7")
(source
(origin
(method url-fetch)
(uri (hackage-uri "purebred-email" version))
(sha256
(base32 "1rw72rjji7bclql975gqpbisapjgzzywydql6p6b1v0ivzpsaq3s"))))
(build-system haskell-build-system)
(properties '((upstream-name . "purebred-email")))
(inputs (list ghc-attoparsec
ghc-case-insensitive
ghc-lens
ghc-base64-bytestring
ghc-concise
ghc-random
ghc-semigroupoids
ghc-stringsearch))
(native-inputs (list ghc-tasty
ghc-tasty-hedgehog
ghc-tasty-quickcheck
ghc-tasty-hunit
ghc-tasty-golden
ghc-hedgehog
ghc-quickcheck-instances))
(home-page "https://github.com/purebred-mua/purebred-email")
(synopsis "types and parser for email messages (including MIME)")
(description
"The purebred email library. RFC 5322, MIME, etc. See \"Data.MIME\" for usage,
examples and API documentation. . This is a general-purpose library for
processing and constructing email messages, originally written to meet the needs
of <https://github.com/purebred-mua/purebred purebred MUA>. Transmission and
delivery of mail are not part of this library, but /purebred-email/ could be a
useful building block for such systems. . Features and implemented
specifications include: . - <https://tools.ietf.org/html/rfc5322 RFC 5322>
message parsing and serialisation - MIME multipart messages
(<https://tools.ietf.org/html/rfc2046 RFC 2046>) - Convenient APIs for replying
and forward/bounce - Content transfer and charset decoding/encoding - MIME
message header extensions for non-ASCII text
(<https://tools.ietf.org/html/rfc2047 RFC 2047>) - MIME parameter value and
encoded word extensions (<https://tools.ietf.org/html/rfc2231 RFC 2231>) -
@@Content-Disposition@@ header field (<https://tools.ietf.org/html/rfc2183 RFC
2183>) - Address syntax in @@From@@ and @@Sender@@ fields
(<https://tools.ietf.org/html/rfc6854 RFC 6854>) - @@Author@@ header field
(<https://tools.ietf.org/html/rfc9057 RFC 9057>).")
(license license:agpl3+)))
(define ghc-safecopy
(package
(name "ghc-safecopy")
(version "0.10.4.3")
(source
(origin
(method url-fetch)
(uri (hackage-uri "safecopy" version))
(sha256
(base32 "03hkb4znm7jaszz290hqal3zbmw3606gafrbdxrvlcfkrpg1m71c"))))
(build-system haskell-build-system)
(properties '((upstream-name . "safecopy")))
(inputs (list ghc-cereal ghc-generic-data ghc-old-time ghc-vector))
(native-inputs (list ghc-lens ghc-lens-action ghc-tasty
ghc-tasty-quickcheck ghc-hunit))
(home-page "https://github.com/acid-state/safecopy")
(synopsis "Binary serialization with version control.")
(description
"An extension to Data.Serialize with built-in version control.")
(license license:public-domain)))
(define 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 hspec-discover
ghc-async
ghc-hspec
ghc-hspec-wai
ghc-lifted-base
ghc-doctest
ghc-http-client))
(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. . @@ &#123;-&#35; LANGUAGE @code{OverloadedStrings} &#35;-&#125; .
import Web.Scotty . main = scotty 3000 $ &#32;&#32;get &#34;/:word&#34; $ do
&#32;&#32;&#32;&#32;beam <- @code{pathParam} &#34;word&#34;
&#32;&#32;&#32;&#32;html $ mconcat [&#34;&#60;h1&#62;Scotty, &#34;, beam, &#34;
me up!&#60;/h1&#62;&#34;] @@ . . 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 ghc-show-combinators
(package
(name "ghc-show-combinators")
(version "0.2.0.0")
(source
(origin
(method url-fetch)
(uri (hackage-uri "show-combinators" version))
(sha256
(base32 "07ds87ldl9165hj3k5h84iawc6vqlbggni3dg1nhbxww1spxn0n9"))))
(build-system haskell-build-system)
(properties '((upstream-name . "show-combinators")))
(arguments
`(#:cabal-revision ("2"
"0n3xlpm41wpw1ybmacg9s7150nx00qrdlw2rq4fzz7iw7333cyjx")))
(home-page "https://github.com/Lysxia/show-combinators#readme")
(synopsis "Combinators to write Show instances")
(description
"This package provides a minimal pretty-printing library for Show instances in
Haskell.")
(license license:expat)))
tiedote-md