Korjaa kääntäminen uudella Guix versiolla

This commit is contained in:
Saku Laesvuori 2026-08-05 12:22:06 +03:00
parent 01ff4b5c08
commit b49e77de8a
Signed by: slaesvuo
GPG Key ID: 257D284A2A1D3A32
7 changed files with 571 additions and 482 deletions

View File

@ -15,10 +15,12 @@
#:use-module (gnu packages version-control)) #:use-module (gnu packages version-control))
(define vcs-file? (define vcs-file?
(or (git-predicate (string-append (current-source-directory) "/../..")) (or (and=> (current-source-directory)
(lambda (dir)
(git-predicate (string-append dir "/../.."))))
(const #t))) (const #t)))
(define-public tiedote-md (define tiedote-md*
(package (package
(name "tiedote-md") (name "tiedote-md")
(version "0.0.1-git") (version "0.0.1-git")
@ -29,7 +31,7 @@
(inputs (list ghc-acid-state (inputs (list ghc-acid-state
ghc-attoparsec ghc-attoparsec
ghc-base64 ghc-base64
ghc-cryptonite ghc-crypton
ghc-case-insensitive ghc-case-insensitive
ghc-glob ghc-glob
ghc-purebred-email ghc-purebred-email
@ -65,90 +67,53 @@ sähköpostipohjaista käyttöliittymää. Toistaiseksi tiedote.md on kovakoodat
käyttämään OMS:n tiedotepohjia.") käyttämään OMS:n tiedotepohjia.")
(license license:agpl3+))) (license license:agpl3+)))
(define ghc-scotty (define ghc-template-haskell-lift
(package (package
(name "ghc-scotty") (name "ghc-template-haskell-lift")
(version "0.12") (version "0.1.0.0")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "scotty" version)) (uri (hackage-uri "template-haskell-lift" version))
(sha256 (sha256
(base32 (base32 "09zilw0nbjmn1k688l058183rwa3br0fvh3x8jxqygjh3011w8ps"))))
"1lpggpdzgjk23mq7aa64yylds5dbm4ynhcvbarqihjxabvh7xmz1"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(inputs (list ghc-aeson (properties '((upstream-name . "template-haskell-lift")))
ghc-base-compat-batteries
ghc-blaze-builder
ghc-case-insensitive
ghc-data-default-class
ghc-fail
ghc-http-types
ghc-monad-control
ghc-nats
ghc-network
ghc-regex-compat
ghc-transformers-base
ghc-transformers-compat
ghc-wai
ghc-wai-extra
ghc-warp))
(native-inputs (list ghc-async ghc-hspec ghc-hspec-wai ghc-lifted-base hspec-discover))
(arguments (arguments
`(#:cabal-revision ("7" `(#:cabal-revision ("1"
"1i8icc612w4dbmqmnf99drqpmjvhjnkmqgk9xr63amj8jkz5lp4m"))) "072g7a9b2sp0vc3g48xqbrxfis1rizqakz0b8064hs0cbgj3xkgn")))
(home-page "https://github.com/scotty-web/scotty") (home-page "http://hackage.haskell.org/package/template-haskell-lift")
(synopsis (synopsis "The 'Lift' typeclass.")
"Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp")
(description (description
"This package provides a Haskell web framework inspired by Ruby's Sinatra, using "The stable home of @code{TemplateHaskell's} Lift typeclass, which implements
WAI and Warp. . @ {-# LANGUAGE OverloadedStrings #-} . import cross-stage persistence for Template Haskell.")
Web.Scotty . import Data.Monoid (mconcat) . main = scotty 3000 $   get (license license:bsd-2)))
&#34;/:word&#34; $ do &#32;&#32;&#32;&#32;beam <- param &#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-hspec-wai (define ghc-doclayout*
(package (package
(name "ghc-hspec-wai") (inherit ghc-doclayout)
(version "0.11.1") (source
(source (origin (origin
(method url-fetch) (inherit (package-source ghc-doclayout))
(uri (hackage-uri "hspec-wai" version)) (patches
(sha256 (list (local-file "../patches/ghc-doclayout-add-lift-instance.patch")))))
(base32 (inputs (modify-inputs (package-inputs ghc-doclayout)
"03wiksic5y9a2g6a86nsxrnajdgdvpv17w02h5qla0zp9zs6pa1j")))) (append ghc-template-haskell-lift)))))
(build-system haskell-build-system)
(inputs (list ghc-quickcheck (define-public tiedote-md
ghc-base-compat ((package-input-rewriting `((,ghc-doclayout . ,ghc-doclayout*)))
ghc-case-insensitive tiedote-md*))
ghc-hspec-core
ghc-hspec-expectations
ghc-http-types
ghc-wai
ghc-wai-extra))
(native-inputs (list ghc-hspec hspec-discover))
(home-page "https://github.com/hspec/hspec-wai#readme")
(synopsis "Experimental Hspec support for testing WAI applications")
(description "Experimental Hspec support for testing WAI applications")
(license license:expat)))
(define ghc-acid-state (define ghc-acid-state
(package (package
(name "ghc-acid-state") (name "ghc-acid-state")
(version "0.16.1.2") (version "0.16.1.4")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "acid-state" version)) (uri (hackage-uri "acid-state" version))
(sha256 (sha256
(base32 (base32 "1z3q0d83dmdhr2s0bh4vhlyz82wik3w8gdmqs5mxk6kw6g7f0xzl"))))
"1ixg62liif1g18ggxap8zdhzy261fj5d24pmb0n36gfhz18b38bx"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "acid-state"))) (properties '((upstream-name . "acid-state")))
(inputs (list ghc-cereal (inputs (list ghc-cereal
@ -157,71 +122,119 @@ Sinatra + Warp = Scotty. . [WAI] <http://hackage.haskell.org/package/wai> .
ghc-network ghc-network
ghc-network-bsd ghc-network-bsd
ghc-th-expand-syns)) ghc-th-expand-syns))
(native-inputs (list ghc-hspec ghc-hspec-discover ghc-hedgehog)) (native-inputs (list hspec-discover ghc-hspec ghc-hedgehog))
(home-page "https://github.com/acid-state/acid-state") (home-page "https://github.com/acid-state/acid-state")
(synopsis "Add ACID guarantees to any serializable Haskell data structure.") (synopsis
"Add ACID guarantees to any serializable Haskell data structure.")
(description (description
"Use regular Haskell data structures as your database and get stronger ACID "Use regular Haskell data structures as your database and get stronger ACID
guarantees than most RDBMS offer.") guarantees than most RDBMS offer.")
(license license:public-domain))) (license license:public-domain)))
(define ghc-safecopy (define ghc-ap-normalize
(package (package
(name "ghc-safecopy") (name "ghc-ap-normalize")
(version "0.10.4.2") (version "0.1.0.1")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "safecopy" version)) (uri (hackage-uri "ap-normalize" version))
(sha256 (sha256
(base32 (base32 "1212zxc4qn6msk0w13yhrza2qjs79h78misllb4chng75jqi61l2"))))
"0r2mf0p82gf8vnldx477b5ykrj1x7hyg13nqfn6gzb50japs6h3i"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "safecopy"))) (properties '((upstream-name . "ap-normalize")))
(inputs (list ghc-cereal (arguments (list #:tests? #f))
ghc-generic-data (home-page "http://hackage.haskell.org/package/ap-normalize")
ghc-old-time (synopsis "Self-normalizing applicative expressions")
ghc-vector)) (description
(native-inputs (list ghc-lens "An applicative functor transformer to normalize expressions using @@(\\<$>)@@,
ghc-lens-action @@(\\<*>)@@, and @@pure@@ into a linear list of actions. See
ghc-tasty \"@code{ApNormalize}\" to get started.")
ghc-tasty-quickcheck (license license:expat)))
ghc-quickcheck-instances
ghc-quickcheck (define ghc-concise
ghc-hunit)) (package
(arguments (name "ghc-concise")
`(#:cabal-revision ("6" (version "0.1.0.1")
"0ii5cdg4l4ww81p7gd5m3z2jdqrs2hvqhwzrlz267nzxbws00x0b"))) (source
(home-page "https://github.com/acid-state/safecopy") (origin
(synopsis "Binary serialization with version control.") (method url-fetch)
(description "An extension to Data.Serialize with built-in version control.") (uri (hackage-uri "concise" version))
(license license:public-domain))) (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 (define ghc-generic-data
(package (package
(name "ghc-generic-data") (name "ghc-generic-data")
(version "1.0.0.1") (version "1.1.0.2")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "generic-data" version)) (uri (hackage-uri "generic-data" version))
(sha256 (sha256
(base32 (base32 "1dfs728nbkilzfmdk6gnjk7wdk1habqn35pb071zcmcp8ll0lzpj"))))
"0fz65k4sxn9c23rg5iv0vij2mksl5rkn6dl2f3i9d9d60b5wca9y"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "generic-data"))) (properties '((upstream-name . "generic-data")))
(inputs (list ghc-ap-normalize (inputs (list ghc-ap-normalize ghc-base-orphans ghc-show-combinators
ghc-contravariant ghc-contravariant))
ghc-show-combinators)) (native-inputs (list ghc-generic-lens
(native-inputs (list ghc-tasty
ghc-tasty-hunit
ghc-tasty ghc-tasty
ghc-tasty-hunit ghc-tasty-hunit
ghc-tasty
ghc-tasty-hunit
ghc-generic-lens
ghc-tasty
ghc-tasty-hunit
ghc-generic-lens
ghc-one-liner)) ghc-one-liner))
(arguments
`(#:cabal-revision ("1"
"0f2aijk70cb01p8yzbg5jq4gawnaryg8qnb1jx4xx92mfmn673p8")))
(home-page "https://github.com/Lysxia/generic-data#readme") (home-page "https://github.com/Lysxia/generic-data#readme")
(synopsis "Deriving instances with GHC.Generics and related utilities") (synopsis "Deriving instances with GHC.Generics and related utilities")
(description (description
@ -233,12 +246,12 @@ representations to help using \"GHC.Generics\". See README.")
(package (package
(name "ghc-lens-action") (name "ghc-lens-action")
(version "0.2.6") (version "0.2.6")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "lens-action" version)) (uri (hackage-uri "lens-action" version))
(sha256 (sha256
(base32 (base32 "0cdprc5j6r976dmrga2zwvcr7qsv7nqy3nvncp66yyy0dk2qlwm3"))))
"0cdprc5j6r976dmrga2zwvcr7qsv7nqy3nvncp66yyy0dk2qlwm3"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "lens-action"))) (properties '((upstream-name . "lens-action")))
(inputs (list ghc-lens ghc-comonad ghc-contravariant ghc-profunctors (inputs (list ghc-lens ghc-comonad ghc-contravariant ghc-profunctors
@ -253,92 +266,94 @@ representations to help using \"GHC.Generics\". See README.")
folds as split off from the original lens package.") folds as split off from the original lens package.")
(license license:bsd-3))) (license license:bsd-3)))
(define ghc-ap-normalize (define ghc-linear-base
(package (package
(name "ghc-ap-normalize") (name "ghc-linear-base")
(version "0.1.0.1") (version "0.5.0")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "ap-normalize" version)) (uri (hackage-uri "linear-base" version))
(sha256 (sha256
(base32 (base32 "0iikqp73i0isxkd8xwg5f8f6dk3cv5iw6ifjkmp5r5kwxb650xgq"))))
"1212zxc4qn6msk0w13yhrza2qjs79h78misllb4chng75jqi61l2"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "ap-normalize"))) (properties '((upstream-name . "linear-base")))
(native-inputs (list ghc-inspection-testing ghc-inspection-testing)) (inputs (list ghc-hashable ghc-linear-generics ghc-storable-tuple
(home-page "http://hackage.haskell.org/package/ap-normalize") ghc-vector ghc-primitive))
(synopsis "Self-normalizing applicative expressions") (native-inputs (list ghc-inspection-testing
(description ghc-tasty-inspection-testing
"An applicative functor transformer to normalize expressions using @@(\\<$>)@@, ghc-tasty
@@(\\<*>)@@, and @@pure@@ into a linear list of actions. See \"ApNormalize\" to ghc-tasty-hedgehog
get started.") 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))) (license license:expat)))
(define ghc-show-combinators (define ghc-linear-generics
(package (package
(name "ghc-show-combinators") (name "ghc-linear-generics")
(version "0.2.0.0") (version "0.2.3")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "show-combinators" version)) (uri (hackage-uri "linear-generics" version))
(sha256 (sha256
(base32 (base32 "0093ywl8s8k92b50li28gcmqc616f6l7jkv7vslkvqzn42yrvbq2"))))
"07ds87ldl9165hj3k5h84iawc6vqlbggni3dg1nhbxww1spxn0n9"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "show-combinators"))) (properties '((upstream-name . "linear-generics")))
(inputs (list ghc-th-abstraction))
(native-inputs (list hspec-discover ghc-hspec))
(arguments (arguments
`(#:cabal-revision ("2" `(#:cabal-revision ("4"
"0n3xlpm41wpw1ybmacg9s7150nx00qrdlw2rq4fzz7iw7333cyjx"))) "1wxb2r70bn1rhs771jlq08q1wvaf7risn6y931snaxa0xwi6a4zq")))
(home-page "https://github.com/Lysxia/show-combinators#readme") (home-page "https://github.com/linear-generics/linear-generics")
(synopsis "Combinators to write Show instances") (synopsis "Generic programming library for generalised deriving.")
(description (description
"This package provides a minimal pretty-printing library for Show instances in "This package offers a version of
Haskell.") <https://hackage.haskell.org/package/base/docs/GHC-Generics.html GHC.Generics>
(license license:expat))) with two important improvements: . 1. The @@to@@, @@from@@, @@to1@@, and
@@from1@@ methods have multiplicity-polymorphic types, allowing them to be used
(define ghc-generic-lens with either traditional Haskell code or linearly typed code. . 2. The
(package representations used for @@Generic1@@ are modified slightly. As a result,
(name "ghc-generic-lens") @@to1@@ and @@from1@@ never need to use @@fmap@@. This can
(version "2.2.2.0") <https://gitlab.haskell.org/ghc/ghc/-/issues/15969 greatly improve performance>,
(source (origin and it is <https://github.com/tweag/linear-base/pull/316 necessary to support
(method url-fetch) multiplicity polymorphism>. A smaller change, approximately
(uri (hackage-uri "generic-lens" version)) <https://gitlab.haskell.org/ghc/ghc/-/issues/7492 as proposed by spl>, reduces
(sha256 the number of instances that must be written to actually use @@Generic1@@ for
(base32 deriving instances of other classes. . For more details, see the
"0s4b51s11ssmndmx9m9zbwgv9rb27ajwihsrk10hn582rp4ck3c6")))) \"Generics.Linear\" documentation. . The implementation is based on the
(build-system haskell-build-system) @@generic-deriving@@ package, first described in the paper . * /A generic
(properties '((upstream-name . "generic-lens"))) deriving mechanism for Haskell/. Jose Pedro Magalhaes, Atze Dijkstra, Johan
(inputs (list ghc-generic-lens-core ghc-profunctors)) Jeuring, and Andres Loeh. Haskell'10. . This library is organized as follows:
(native-inputs (list ghc-lens . * \"Generics.Linear\" defines the core functionality for generics, including the
ghc-inspection-testing multiplicity-polymorphic @@Generic(1)@@ classes and a replacement for the
ghc-hunit @@:.:@@ composition type. . * \"Generics.Linear.TH\" implements Template Haskell
ghc-lens functionality for deriving instances of @@Generic(1)@@. . *
ghc-hunit \"Generics.Linear.Unsafe.@code{ViaGHCGenerics}\" offers @code{@@DerivingVia}@@
ghc-lens targets to derive @@Generic@@ and @@Generic1@@ instances from
ghc-hunit @@\"GHC.Generics\".'GHC.Generics.Generic'@@. Because these instances necessarily
ghc-doctest use unsafe coercions, their use will likely inhibit full optimization of code
ghc-lens)) using them. . Educational code: the educational modules exported by
(home-page "https://github.com/kcsongor/generic-lens") <https://hackage.haskell.org/package/generic-deriving generic-deriving> have
(synopsis "Generically derive traversals, lenses and prisms.") been copied into the @@tests\\/Generic\\/Deriving@@ directory in this repository,
(description with the very few modifications required to accommodate the differences between
"This library uses GHC.Generics to derive efficient optics (traversals, lenses the @@Generic1@@ representations here and in @@base@@. All the same caveats
and prisms) for algebraic data types in a type-directed way, with a focus on apply as in the originals; see that package's @@README@@.")
good type inference and error messages when possible. The library exposes a
van Laarhoven interface. For an alternative interface, supporting an opaque
optic type, see @@<https://hackage.haskell.org/package/generic-optics
generic-optics>@@.")
(license license:bsd-3))) (license license:bsd-3)))
(define ghc-one-liner (define ghc-one-liner
(package (package
(name "ghc-one-liner") (name "ghc-one-liner")
(version "2.1") (version "2.1")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "one-liner" version)) (uri (hackage-uri "one-liner" version))
(sha256 (sha256
(base32 (base32 "09gdivd38disddxs42179vmgca0yzk5dfm6ygicgl5l25qbizrfh"))))
"09gdivd38disddxs42179vmgca0yzk5dfm6ygicgl5l25qbizrfh"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "one-liner"))) (properties '((upstream-name . "one-liner")))
(inputs (list ghc-contravariant ghc-bifunctors ghc-profunctors ghc-tagged (inputs (list ghc-contravariant ghc-bifunctors ghc-profunctors ghc-tagged
@ -354,152 +369,16 @@ generic-optics>@@.")
particularly useful for writing default implementations of type class methods.") particularly useful for writing default implementations of type class methods.")
(license license:bsd-3))) (license license:bsd-3)))
(define ghc-generic-lens-core
(package
(name "ghc-generic-lens-core")
(version "2.2.1.0")
(source (origin
(method url-fetch)
(uri (hackage-uri "generic-lens-core" version))
(sha256
(base32
"08i4c9yb6z84iknrnl9f3f343121j7ilp0a679v81nsjm9xz3rlf"))))
(build-system haskell-build-system)
(properties '((upstream-name . "generic-lens-core")))
(inputs (list ghc-indexed-profunctors))
(arguments
`(#:cabal-revision ("1"
"1dbjhd6k7ypqa9f4h9v2xndgb4mjhfli3n1vjm8r8ga0kfndbqfn")))
(home-page "https://github.com/kcsongor/generic-lens")
(synopsis "Generically derive traversals, lenses and prisms.")
(description
"This library uses GHC.Generics to derive efficient optics (traversals, lenses
and prisms) for algebraic data types in a type-directed way, with a focus on
good type inference and error messages when possible. This package is the
shared internal logic of the @@<https://hackage.haskell.org/package/generic-lens
generic-lens>@@ and @@<https://hackage.haskell.org/package/generic-optics
generic-optics>@@ libraries.")
(license license:bsd-3)))
(define ghc-indexed-profunctors
(package
(name "ghc-indexed-profunctors")
(version "0.1.1")
(source (origin
(method url-fetch)
(uri (hackage-uri "indexed-profunctors" version))
(sha256
(base32
"1cbccbvrx73drr1jf3yyw0rp1mcfv3jc1rvdcby5xxx4ja543fjs"))))
(build-system haskell-build-system)
(properties '((upstream-name . "indexed-profunctors")))
(home-page "http://hackage.haskell.org/package/indexed-profunctors")
(synopsis "Utilities for indexed profunctors")
(description
"This package contains basic definitions related to indexed profunctors. These
are primarily intended as internal utilities to support the @@optics@@ and
@@generic-lens@@ package families.")
(license license:bsd-3)))
(define ghc-linear-base
(package
(name "ghc-linear-base")
(version "0.3.1")
(source (origin
(method url-fetch)
(uri (hackage-uri "linear-base" version))
(sha256
(base32
"1gm8bwyi39x5x29xb6nq13x9x9p30vm29s11k4pkcql70sj4pv0h"))))
(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-hedgehog
ghc-tasty
ghc-tasty-hedgehog
ghc-mmorph
ghc-tasty
ghc-tasty-hedgehog
ghc-hedgehog))
(arguments
`(#:cabal-revision ("1"
"153nkw2i7n22xzfj8q2xmzsh77pr7pay8v3gc1xli491qmsc0fcd")))
(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.2")
(source (origin
(method url-fetch)
(uri (hackage-uri "linear-generics" version))
(sha256
(base32
"0ls571qzayky0dax9d209lw9wv344z3969daqcsncv0r5rlvlps9"))))
(build-system haskell-build-system)
(properties '((upstream-name . "linear-generics")))
(inputs (list ghc-th-abstraction-0.5))
(native-inputs (list ghc-hspec hspec-discover))
(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.")
(license license:bsd-3)))
(define ghc-th-abstraction-0.5
(package
(inherit ghc-th-abstraction)
(version "0.5.0.0")
(source (origin
(method url-fetch)
(uri (hackage-uri "th-abstraction" version))
(sha256
(base32
"0r4ri85283i1jjhd94wa9nps6cd9a8mh6rr4ds1gb2hqnwxdqn42"))))))
(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 git mercurial))
(native-inputs (list ghc-hunit))
(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-purebred-email (define ghc-purebred-email
(package (package
(name "ghc-purebred-email") (name "ghc-purebred-email")
(version "0.6.0.1") (version "0.7")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "purebred-email" version)) (uri (hackage-uri "purebred-email" version))
(sha256 (sha256
(base32 (base32 "1rw72rjji7bclql975gqpbisapjgzzywydql6p6b1v0ivzpsaq3s"))))
"0gdzdbxgsyps8hqd903bsyja0cr6kbklkicvma62q48wv0y7230j"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "purebred-email"))) (properties '((upstream-name . "purebred-email")))
(inputs (list ghc-attoparsec (inputs (list ghc-attoparsec
@ -533,48 +412,110 @@ and forward/bounce - Content transfer and charset decoding/encoding - MIME
message header extensions for non-ASCII text message header extensions for non-ASCII text
(<https://tools.ietf.org/html/rfc2047 RFC 2047>) - MIME parameter value and (<https://tools.ietf.org/html/rfc2047 RFC 2047>) - MIME parameter value and
encoded word extensions (<https://tools.ietf.org/html/rfc2231 RFC 2231>) - 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 @@Content-Disposition@@ header field (<https://tools.ietf.org/html/rfc2183 RFC
(<https://tools.ietf.org/html/rfc6854 RFC 6854>)") 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+))) (license license:agpl3+)))
(define ghc-concise (define ghc-safecopy
(package (package
(name "ghc-concise") (name "ghc-safecopy")
(version "0.1.0.1") (version "0.10.4.3")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "concise" version)) (uri (hackage-uri "safecopy" version))
(sha256 (sha256
(base32 (base32 "03hkb4znm7jaszz290hqal3zbmw3606gafrbdxrvlcfkrpg1m71c"))))
"09crgc6gjfidlad6263253xx1di6wfhc9awhira21s0z7rddy9sw"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "concise"))) (properties '((upstream-name . "safecopy")))
(inputs (list ghc-lens)) (inputs (list ghc-cereal ghc-generic-data ghc-old-time ghc-vector))
(native-inputs (list ghc-tasty ghc-tasty-quickcheck ghc-quickcheck (native-inputs (list ghc-lens ghc-lens-action ghc-tasty
ghc-quickcheck-instances)) ghc-tasty-quickcheck ghc-hunit))
(home-page "https://github.com/frasertweedale/hs-concise") (home-page "https://github.com/acid-state/safecopy")
(synopsis "Utilities for Control.Lens.Cons") (synopsis "Binary serialization with version control.")
(description (description
"concise provides a handful of functions to extend what you can do with "An extension to Data.Serialize with built-in version control.")
Control.Lens.Cons.") (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))) (license license:bsd-3)))
(define ghc-exit-codes (define ghc-show-combinators
(package (package
(name "ghc-exit-codes") (name "ghc-show-combinators")
(version "1.0.0") (version "0.2.0.0")
(source (origin (source
(origin
(method url-fetch) (method url-fetch)
(uri (hackage-uri "exit-codes" version)) (uri (hackage-uri "show-combinators" version))
(sha256 (sha256
(base32 (base32 "07ds87ldl9165hj3k5h84iawc6vqlbggni3dg1nhbxww1spxn0n9"))))
"00cyli96zkyqhjr3lqzrislqyk72xwm2dcqvjagklidh32d4k8ja"))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . "exit-codes"))) (properties '((upstream-name . "show-combinators")))
(home-page "http://github.com/JustusAdam/exit-codes") (arguments
(synopsis "Exit codes as defined by BSD") `(#:cabal-revision ("2"
"0n3xlpm41wpw1ybmacg9s7150nx00qrdlw2rq4fzz7iw7333cyjx")))
(home-page "https://github.com/Lysxia/show-combinators#readme")
(synopsis "Combinators to write Show instances")
(description (description
"Expose the exit codes defined by BSD in sysexits.h to the Haskell world.") "This package provides a minimal pretty-printing library for Show instances in
(license license:bsd-3))) Haskell.")
(license license:expat)))
tiedote-md tiedote-md

View File

@ -0,0 +1,149 @@
From 8179aba8aa35ac3fa518a2a398b0f66b67092433 Mon Sep 17 00:00:00 2001
From: Saku Laesvuori <saku@laesvuori.fi>
Date: Wed, 5 Aug 2026 10:28:41 +0300
Subject: [PATCH] Add Template Haskell Lift instance for Doc
---
doclayout.cabal | 1 +
src/Text/DocLayout.hs | 4 +++-
src/Text/DocLayout/ANSIFont.hs | 20 +++++++++++---------
src/Text/DocLayout/Attributed.hs | 6 ++++--
4 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/doclayout.cabal b/doclayout.cabal
index 83ad188..ff3b545 100644
--- a/doclayout.cabal
+++ b/doclayout.cabal
@@ -32,6 +32,7 @@ library
containers,
emojis >=0.1.2,
mtl,
+ template-haskell-lift,
safe
default-language: Haskell2010
ghc-options: -Wall -fno-warn-unused-do-bind
diff --git a/src/Text/DocLayout.hs b/src/Text/DocLayout.hs
index d4ff1b3..7c252df 100644
--- a/src/Text/DocLayout.hs
+++ b/src/Text/DocLayout.hs
@@ -4,6 +4,7 @@
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
@@ -127,6 +128,7 @@ import qualified Data.Text as T
import Data.Text (Text)
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Builder as B
+import Language.Haskell.TH.Lift (Lift)
import Text.DocLayout.HasChars
import Text.DocLayout.ANSIFont
import Text.DocLayout.Attributed
@@ -159,7 +161,7 @@ data Doc a = Text Int a -- ^ Text with specified width.
| Linked Text (Doc a) -- ^ A hyperlink
| Empty
deriving (Show, Read, Eq, Ord, Functor, Foldable, Traversable,
- Data, Typeable, Generic)
+ Data, Typeable, Generic, Lift)
instance Semigroup (Doc a) where
diff --git a/src/Text/DocLayout/ANSIFont.hs b/src/Text/DocLayout/ANSIFont.hs
index b952d0b..7002f92 100644
--- a/src/Text/DocLayout/ANSIFont.hs
+++ b/src/Text/DocLayout/ANSIFont.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveLift #-}
module Text.DocLayout.ANSIFont
( Font(..)
, baseFont
@@ -17,6 +18,7 @@ module Text.DocLayout.ANSIFont
) where
import Data.Data (Data)
+import Language.Haskell.TH.Lift (Lift)
import Data.String
import Data.Text (Text)
@@ -29,18 +31,18 @@ data Font = Font
ftBackground :: Background,
ftLink :: Maybe Text
}
- deriving (Show, Eq, Read, Data, Ord)
+ deriving (Show, Eq, Read, Data, Ord, Lift)
baseFont :: Font
baseFont = Font Normal Roman ULNone Unstruck FGDefault BGDefault Nothing
-data Weight = Normal | Bold deriving (Show, Eq, Read, Data, Ord)
-data Shape = Roman | Italic deriving (Show, Eq, Read, Data, Ord)
-data Color8 = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Show, Eq, Enum, Read, Data, Ord)
-data Underline = ULNone | ULSingle | ULDouble | ULCurly deriving (Show, Eq, Read, Data, Ord)
-data Strikeout = Unstruck | Struck deriving (Show, Eq, Read, Data, Ord)
-data Foreground = FGDefault | FG Color8 deriving (Show, Eq, Read, Data, Ord)
-data Background = BGDefault | BG Color8 deriving (Show, Eq, Read, Data, Ord)
+data Weight = Normal | Bold deriving (Show, Eq, Read, Data, Ord, Lift)
+data Shape = Roman | Italic deriving (Show, Eq, Read, Data, Ord, Lift)
+data Color8 = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Show, Eq, Enum, Read, Data, Ord, Lift)
+data Underline = ULNone | ULSingle | ULDouble | ULCurly deriving (Show, Eq, Read, Data, Ord, Lift)
+data Strikeout = Unstruck | Struck deriving (Show, Eq, Read, Data, Ord, Lift)
+data Foreground = FGDefault | FG Color8 deriving (Show, Eq, Read, Data, Ord, Lift)
+data Background = BGDefault | BG Color8 deriving (Show, Eq, Read, Data, Ord, Lift)
data StyleReq
= RWeight Weight
@@ -49,7 +51,7 @@ data StyleReq
| RBackground Background
| RUnderline Underline
| RStrikeout Strikeout
- deriving (Show, Eq, Read, Data, Ord)
+ deriving (Show, Eq, Read, Data, Ord, Lift)
(~>) :: Font -> StyleReq -> Font
(~>) f (RWeight w) = f{ftWeight = w}
diff --git a/src/Text/DocLayout/Attributed.hs b/src/Text/DocLayout/Attributed.hs
index 46574a1..24124c3 100644
--- a/src/Text/DocLayout/Attributed.hs
+++ b/src/Text/DocLayout/Attributed.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
@@ -9,6 +10,7 @@ import Data.String
import Text.DocLayout.ANSIFont (Font, baseFont)
import Data.Data (Data, Typeable)
import GHC.Generics
+import Language.Haskell.TH.Lift (Lift)
import Data.Sequence ((><))
import qualified Data.Sequence as S
import Data.Text (Text)
@@ -18,7 +20,7 @@ type Link = Maybe Text
-- | Font attributes.
data Attr a = Attr Link Font a
deriving (Show, Read, Eq, Ord, Functor, Foldable, Traversable,
- Data, Typeable, Generic)
+ Data, Typeable, Generic, Lift)
instance Semigroup a => Semigroup (Attr a) where
(<>) (Attr l f x) (Attr _ _ y) = Attr l f $ x <> y -- This is arbitrary
@@ -29,7 +31,7 @@ instance (IsString a, Monoid a) => Monoid (Attr a) where
-- | A sequence of strings with font attributes.
newtype Attributed a = Attributed (S.Seq (Attr a))
deriving (Show, Read, Eq, Ord, Functor, Foldable, Traversable,
- Data, Typeable, Generic)
+ Data, Typeable, Generic, Lift)
fromList :: [Attr a] -> Attributed a
fromList = Attributed . S.fromList
base-commit: aa2e9d853b7c26f49d3b540f7ca0625e612503ce
--
2.54.0

View File

@ -3,7 +3,7 @@
(url "https://git.savannah.gnu.org/git/guix.git") (url "https://git.savannah.gnu.org/git/guix.git")
(branch "master") (branch "master")
(commit (commit
"b2943f6791d02feda7901c3dc2c777193e664455") "86813d5779253bb50002d79ab791eeda5a8b4729")
(introduction (introduction
(make-channel-introduction (make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad" "9edb3f66fd807b096b48283debdcddccfea34bad"

View File

@ -22,7 +22,7 @@ import System.Directory (findExecutable)
import System.Exit (exitWith) import System.Exit (exitWith)
import System.Exit.Codes (codeTempFail) import System.Exit.Codes (codeTempFail)
import System.Posix.User (getRealUserID, userName, getUserEntryForID) import System.Posix.User (getRealUserID, userName, getUserEntryForID)
import Web.Scotty (scotty, post, liftAndCatchIO, defaultHandler) import Web.Scotty (scotty, post, liftIO, defaultHandler, Handler(Handler), ScottyException)
import qualified Data.Text as T import qualified Data.Text as T
import qualified Data.Text.Lazy.IO as LT import qualified Data.Text.Lazy.IO as LT
@ -41,8 +41,8 @@ serverMain socket mail repoPath origin sendmailPath checkpointDelay port = do
_ <- forkIO $ acidServerSockAddr skipAuthenticationCheck socket acid _ <- forkIO $ acidServerSockAddr skipAuthenticationCheck socket acid
queueMessages acid queueMessages acid
_ <- forkIO $ scotty port $ do _ <- forkIO $ scotty port $ do
defaultHandler $ liftAndCatchIO . LT.putStrLn -- Don't return exceptions to clients defaultHandler $ Handler $ liftIO . (print :: ScottyException -> IO ())
post "/" $ liftAndCatchIO $ void $ forkIO $ updateMessages acid repoPath origin post "/" $ liftIO $ void $ forkIO $ updateMessages acid repoPath origin
updateMessages acid repoPath origin updateMessages acid repoPath origin
_ <- forkIO $ manageQueueingMessages acid _ <- forkIO $ manageQueueingMessages acid
_ <- forkIO $ managePreviews acid mail sendmailPath _ <- forkIO $ managePreviews acid mail sendmailPath

View File

@ -18,6 +18,7 @@ import Data.Bifunctor (first, second)
import Data.ByteArray (convert) import Data.ByteArray (convert)
import Data.ByteString (ByteString) import Data.ByteString (ByteString)
import "base64" Data.ByteString.Base64.URL import "base64" Data.ByteString.Base64.URL
import Data.Base64.Types (extractBase64)
import Data.Default (def) import Data.Default (def)
import Data.Either (rights, lefts, fromRight) import Data.Either (rights, lefts, fromRight)
import Data.FileStore (FileStore(..), Revision(..), FileStoreError(..), gitFileStore) import Data.FileStore (FileStore(..), Revision(..), FileStoreError(..), gitFileStore)
@ -128,7 +129,7 @@ readMessageFile store file = retrieve store file Nothing >>=
cidOf :: MediaItem -> ContentID cidOf :: MediaItem -> ContentID
cidOf MediaItem {mediaContents, mediaMimeType} = cidOf MediaItem {mediaContents, mediaMimeType} =
fromRight (error "makeContentID failed with valid input!") $ fromRight (error "makeContentID failed with valid input!") $
makeContentID $ "<" <> encodedHash <> "@tiedote.md.sha256>" makeContentID $ "<" <> extractBase64 encodedHash <> "@tiedote.md.sha256>"
where encodedHash = encodeBase64' $ convert $ hashWith SHA256 $ where encodedHash = encodeBase64' $ convert $ hashWith SHA256 $
LBS.toStrict mediaContents <> encodeUtf8 mediaMimeType LBS.toStrict mediaContents <> encodeUtf8 mediaMimeType

View File

@ -8,7 +8,6 @@ module TiedoteMD.Templates.TH where
import Control.Exception (throwIO) import Control.Exception (throwIO)
import Data.FileEmbed import Data.FileEmbed
import Language.Haskell.TH.Syntax (Q, Exp, Lift, runIO, lift, Quasi(qAddDependentFile)) import Language.Haskell.TH.Syntax (Q, Exp, Lift, runIO, lift, Quasi(qAddDependentFile))
import Text.DocLayout (Doc(..))
import Text.DocTemplates.Internal (Variable(..), Pipe(..), Alignment(..), Border(..), Template(..)) import Text.DocTemplates.Internal (Variable(..), Pipe(..), Alignment(..), Border(..), Template(..))
import Text.Pandoc (compileTemplate) import Text.Pandoc (compileTemplate)
@ -17,7 +16,6 @@ import qualified Data.Text.IO as T
import TiedoteMD.Types import TiedoteMD.Types
deriving instance Lift (Doc T.Text)
deriving instance Lift (Template T.Text) deriving instance Lift (Template T.Text)
deriving instance Lift Alignment deriving instance Lift Alignment
deriving instance Lift Border deriving instance Lift Border

View File

@ -1,6 +1,6 @@
cabal-version: 3.6 cabal-version: 3.6
name: tiedote-md name: tiedote-md
version: 0.0.1 version: 0.0.2
author: Saku Laesvuori author: Saku Laesvuori
maintainer: saku@laesvuori.fi maintainer: saku@laesvuori.fi
bug-reports: https://git.olarinmaensamoojat.fi/OMS/tiedote.md/issues bug-reports: https://git.olarinmaensamoojat.fi/OMS/tiedote.md/issues
@ -30,7 +30,7 @@ executable tiedote.md
bytestring, bytestring,
case-insensitive, case-insensitive,
containers, containers,
cryptonite, crypton,
data-default, data-default,
directory, directory,
doclayout, doclayout,