funflow-nix: Utility functions for using funflow with nix

[ bsd3, library, unclassified ] [ Propose Tags ]

This library provides functions to create flows which run commands in environments created by nix commands. It is designed to be like the docker integration but the environments are created by nix rather than in a container.

[Skip to Readme]
Versions [faq]
Change log
Dependencies base (>=4.10 && <5), funflow (>=1.4), funflow-nix, modern-uri, path, path-io, text [details]
License BSD-3-Clause
Author Matthew Pickering
Source repo head: git clone
Uploaded by mpickering at Sat Nov 17 08:53:54 UTC 2018
Distributions NixOS:
Executables example
Downloads 129 total (21 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user [build log]
All reported builds failed as of 2018-11-17 [all 1 reports]





Build the example executable


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for funflow-nix-

[back to package description]

funflow-nix provides functions for creating flows which run in a nix environment.

The library exposes the NixConfig data type which allows you to specify the environment and command to run. This is then turned into a flow using nix.

A complete example can be seen in examples/Simple.hs.

We can pin the version of nixpkgs we want to use by specifying a tarball to use as the source.

tarballSource :: NixpkgsSource
tarballSource = NixpkgsTarball [uri||]

nixConfig :: Environment -> NixConfig
nixConfig senv =
  NixShellConfig {
    environment = senv
    , command = "jq"
    , args = [ParamText "--version"]
    , env = []
    , stdout = StdOutCapture
    , nixpkgsSource = tarballSource

Once the config has been specified. It can be turned into a flow by using the nix function.

jqVersionPkg :: SimpleFlow () String
jqVersionPkg = readString_ <<< nix (\() -> nixConfig (PackageList ["jq"]))