You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spago assumes a backed has a --run Module.Name.function flag that will execute the given function. This is also how tests are implemented. I think the following snippet is a reasonable implementation for --run in purenix.
This would of course be implemented within Haskell and the module to import as well as the function to evaluate is defined by the flag.
The snippet runs evaluation against a temporary nix store and in readonly-mode so it should be fine run inside a nix build. I've only tested that it does indeed run in the simplest of scenarios so far.
The text was updated successfully, but these errors were encountered:
Isolating the store might not be necessary in the general sense. I’m trying to support running tests within a nix derivation, hence the need for the isolation. The last line (without readonly-mode) is likely the thing that purenix should do and the rest should be provided by a wrapper to support the tests in nix use case.
Spago assumes a backed has a
--run Module.Name.function
flag that will execute the given function. This is also how tests are implemented. I think the following snippet is a reasonable implementation for--run
in purenix.This would of course be implemented within Haskell and the module to import as well as the function to evaluate is defined by the flag.
The snippet runs evaluation against a temporary nix store and in readonly-mode so it should be fine run inside a nix build. I've only tested that it does indeed run in the simplest of scenarios so far.
The text was updated successfully, but these errors were encountered: