mirror of
https://github.com/srid/haskell-flake.git
synced 2024-09-11 14:05:58 +03:00
17 lines
442 B
Nix
17 lines
442 B
Nix
{ name, ... }:
|
|
|
|
{
|
|
# traceDebug uses traceVerbose; and is no-op on Nix versions below 2.10
|
|
traceDebug =
|
|
if builtins.compareVersions "2.10" builtins.nixVersion < 0
|
|
then msg: builtins.traceVerbose ("DEBUG[haskell-flake] [${name}]: " + msg)
|
|
else x: x;
|
|
|
|
traceWarning = msg:
|
|
builtins.trace ("WARNING[haskell-flake] [${name}]: " + msg);
|
|
|
|
throwError = msg: builtins.throw ''
|
|
ERROR[haskell-flake] [${name}]: ${msg}
|
|
'';
|
|
}
|