nh2 / static-haskell-nix

easily build most Haskell programs into fully static Linux executables
388 stars 36 forks source link

support nix-shell develop-mode. #83

Open clojurians-org opened 4 years ago

clojurians-org commented 4 years ago

is it feasible to get nix-shell develop-mode environment? so [nix-shell --pure --run 'cabal repl'] can be used for develop.

it's space-waste to use different tool for development and build.

nh2 commented 4 years ago

I think that should work.

I haven't tried it for static-haskell-nix specifically, but in other nix+Haskell projects I regularly go into the nix-shell and do Cabal actions using runghc Setup.hs mycommand ..., e.g. the repl you mention.

Give it a shot and report back :)

clojurians-org commented 4 years ago

i can use cabal for developing easily with static build. only with emacs + dante, it will work. but i have no idea how to do it for stack, i'll explore the stack2nix a little.

some simple example

https://github.com/clojurians-org/haskell-example/blob/master/minio-migration/default.nix https://github.com/clojurians-org/my-env/blob/master/nix.conf/postgrest-6.0.1/default.nix

clojurians-org commented 4 years ago

i found haskell.nix is more friendly integrated with stack for nix. https://github.com/input-output-hk/haskell.nix