From 9b50459ffbc1aead6f3fb613a6345c52b0c985bd Mon Sep 17 00:00:00 2001 From: hashirama Date: Mon, 26 May 2025 21:40:14 -0400 Subject: [PATCH] add ghc-dirstream --- ajatt/packages/haskell.scm | 59 +++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/ajatt/packages/haskell.scm b/ajatt/packages/haskell.scm index 7bd4dfe..c3f2608 100644 --- a/ajatt/packages/haskell.scm +++ b/ajatt/packages/haskell.scm @@ -1927,4 +1927,61 @@ IEEE Std. 1003.1). . The package is not supported under Windows.") (license license:bsd-3))) -ghc-libarchive +(define-public ghc-pipes-safe + (package + (name "ghc-pipes-safe") + (version "2.3.5") + (source + (origin + (method url-fetch) + (uri (hackage-uri "pipes-safe" version)) + (sha256 + (base32 "13npagy597g6zfr2f3vj4a98h2ssg2ps7lmdzrgdsvm8m28x3cph")))) + (build-system haskell-build-system) + (properties '((upstream-name . "pipes-safe"))) + (inputs (list ghc-transformers-base ghc-monad-control ghc-primitive + ghc-pipes)) + (arguments + `(#:cabal-revision ("3" + "1wic8km3c17g2xrmxd4qj5qmppb76k7srxrgj8jg1vs6g2l7v6cs"))) + (home-page "http://hackage.haskell.org/package/pipes-safe") + (synopsis "Safety for the pipes ecosystem") + (description + "This package adds resource management and exception handling to the @@pipes@@ +ecosystem. . Notable features include: . * /Resource Safety/: Guarantee +finalization using @@finally@@, @@bracket@@ and more . * /Exception Safety/: +Even against asynchronous exceptions! . * /Laziness/: Only acquire resources +when you need them . * /Promptness/: Finalize resources early when you are done +with them . * /Native Exception Handling/: Catch and resume from exceptions +inside pipes . * /No Buy-in/: Mix resource-safe pipes with unmanaged pipes using +@@hoist@@.") + (license license:bsd-3))) + +(define-public ghc-dirstream + (package + (name "ghc-dirstream") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (hackage-uri "dirstream" version)) + (sha256 + (base32 "1xnxsx1m06jm8yvim1xnvfkwylhyab51wvba1j3fbicy4ysblfz0")))) + (build-system haskell-build-system) + (properties '((upstream-name . "dirstream"))) + (inputs (list ghc-system-filepath ghc-system-fileio ghc-pipes + ghc-pipes-safe)) + (arguments + `(#:cabal-revision ("2" + "0k4nzimxqc6a47a16yysh39m4vjy9pbyi3j7lygrnaz780c338kc"))) + (home-page "http://hackage.haskell.org/package/dirstream") + (synopsis "Easily stream directory contents in constant memory") + (description + "Use this library to read large directories as streams: . * Use @code{@@ListT}@@ +to assemble recursive directory traversals while still streaming . * Use +@@pipes@@ to read out the stream of results . * Traversals only open directory +streams lazily in response to demand . * Avoid directories with insufficient +permissions . This library works on both Unix and Windows.") + (license license:bsd-3))) + +ghc-dirstream