From 3b0e6a04e99c44adbe67b4a6903abd700c371f0c Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 26 Jan 2020 11:11:02 -0800 Subject: [PATCH 28/34] gnu: Add ghc-mintty. * gnu/packages/haskell-xyz.scm (ghc-mintty): New variable. --- gnu/packages/haskell-xyz.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index ce45a91779..3341be3485 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -7590,6 +7590,41 @@ generated lenses are fully compatible with ones generated by lens (and can be used both from lens and microlens).") (license license:bsd-3))) +(define-public ghc-mintty + (package + (name "ghc-mintty") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/mintty/mintty-" + version + ".tar.gz")) + (sha256 + (base32 + "1njhz7wjmsk5pbr7gfkl95k50npkmm0iyxp3j93bbsg4rmxzg2kw")))) + (build-system haskell-build-system) + (home-page + "https://github.com/RyanGlScott/mintty") + (synopsis + "Reliably detect the presence of a MinTTY console on Windows") + (description + "MinTTY is a Windows-specific terminal emulator for the widely used +Cygwin and MSYS projects, which provide Unix-like environments for Windows. +MinTTY consoles behave differently from native Windows consoles (such as +cmd.exe or PowerShell) in many ways, and in some cases, these differences make +it necessary to treat MinTTY consoles differently in code. + +The mintty library provides a simple way to detect if your code in running in +a MinTTY console on Windows. It exports @code{isMinTTY}, which does the right +thing 90% of the time (by checking if standard error is attached to MinTTY), +and it also exports @code{isMinTTYHandle} for the other 10% of the time (when +you want to check is some arbitrary handle is attached to MinTTY). As you +might expect, both of these functions will simply return @code{False} on any +non-Windows operating system.") + (license license:bsd-3))) + (define-public ghc-missingh (package (name "ghc-missingh") -- 2.25.0