Chris Stryczynski
Chris Stryczynski

Reputation: 34041

How can I prevent stack build using nix from the command line?

I'm trying to build a docker image of a Haskell application.

In my stack.yaml I have nix enabled with:

nix: 
  enable: true

When running 'stack build' in the docker container (that does not have nix) it errors with:

Downloading lts-13.5 build plan ...
Downloaded lts-13.5 build plan.
Executable named nix-shell not found on path:

Can I disable nix (some command line flag?) without having to modify the stack.yaml file?

Upvotes: 0

Views: 202

Answers (1)

Steven Shaw
Steven Shaw

Reputation: 6249

You can disable nix on the command line using:

stack --no-nix build

Upvotes: 1

Related Questions