GitXplorerGitXplorer
m

funflow-nix

public
5 stars
0 forks
2 issues

Commits

List of commits on branch master.
Unverified
dd088e03b3bacd297859f68c38dc7bc7fa8aedfc

Pin nixpkgs for CI

mmpickering committed 6 years ago
Unverified
016b73bfd9bd2d4bf3aad7c483243317dee76bde

Run update as well

mmpickering committed 6 years ago
Unverified
62215e6c35aad2b1c5d8ac17bbce44c35f08bce7

ghc843 -> ghc844

mmpickering committed 6 years ago
Unverified
5997bdf1d0806ed94f6373ec3503b038c9d0e6f7

Remove simple-server from shell.nix

mmpickering committed 6 years ago
Unverified
5fd23c2c883eb0c6285050a2c2bfbe4b7d81fb4f

Try 2

mmpickering committed 6 years ago
Unverified
4c1e2c6c3940f19c4b1a9655534a3df0931624a2

Try using nix CI

mmpickering committed 6 years ago

README

The README file for this repository.

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|https://github.com/NixOS/nixpkgs/archive/a19357241973538212b5cb435dde84ad25cbe337.tar.gz|]

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"]))