Commit Graph

3 Commits (87cce0ba6aaf07df0c11e74c86bdb5754a15b76c)

Author SHA1 Message Date
timor 655f54af19 shell.nix: supply `wrapFactor` helper to make standalone factor binary
This adds the shell function `wrapFactor`.  This function is intended to wrap
the result of calling `build.sh` in the shell environment so it can be executed
outside of the nix shell.

Example:

```
$ nix-shell
[nix-shell] $ ./build.sh bootstrap
...build factor vm and image...
[nix-shell] $ wrapFactor .
exit
$ ./factor
```

`wrapFactor` takes the path to the factor root dir as argument, and expects the
binary `factor` and the image file `factor.image` there and uses Nixpkgs'
`makeWrapper` to wrap the `factor` executable in-place with the correct
`LD_LIBRARY_PATH`.  Afterwards, the factor executable can be called outside of
the nix-shell environment.
2020-05-22 17:11:26 +00:00
timor 3c789cb0a7 Simplify nix shell environment
`buildFHSUserEnv` uses `chroot` to create a kind of sandbox environment.  This
change uses a simpler mechanism, and also provides the necessary libraries for
running all the demos.
2019-10-16 08:57:47 -07:00
Kye W. Shi b02ae64e91 add shell.nix for building/running on NixOS 2019-10-15 11:26:20 -07:00