~fgaz/orchid

2260e1990b7e0674c623a0587d50873929afb162 — Francesco Gazzetta 2 years ago eb8b370
Support nix >=2.4 (only)

There is a backward-incompatible change in nix eval
2 files changed, 3 insertions(+), 1 deletions(-)

M README.md
M src/BaseContext.hs
M README.md => README.md +2 -0
@@ 26,6 26,8 @@ or:

    nix install

Nix >=2.4 with the `nix-command` feature enabled is required.

## Usage

To scan `PATH` for references and pin them, run

M src/BaseContext.hs => src/BaseContext.hs +1 -1
@@ 17,7 17,7 @@ data BaseContext = BaseContext
establishBaseContext :: GlobalOptions -> IO BaseContext
establishBaseContext globalOpts = do
  defaultStoreDir <- readProcess "nix"
                       ["eval", "--raw", "(builtins.storeDir)"]
                       ["eval", "--raw", "--expr", "builtins.storeDir"]
                       mempty
  pure BaseContext
    { storeDir = fromMaybe defaultStoreDir $ GlobalOptions.storeDir globalOpts