diff options
-rw-r--r-- | Makefile | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -1,18 +1,25 @@ -.PHONY: ghci -ghci: shell.nix - nix-shell --arg nixpkgs 'import <stockholm>' --command 'exec ghci -Wall' - -shell.nix: $(wildcard *.cabal) - cabal2nix --shell . > $@ +.PHONY: _default +_default: ghci .PHONY: clean clean: @find * -type f \( -name \*.o -o -name \*.hi \) -exec rm -v \{\} \; +.PHONY: ghci +ghci: shell.nix + nix-shell --arg nixpkgs 'import <stockholm>' --command 'exec ghci -Wall -fobject-code' + .PHONY: install install: - nix-env --arg target "$$(cabal2nix .)" -f install.nix -i + $(error to install run "make result && nix-env -i ./result") .PHONY: install-env install-env: nix-env -f env.nix -i + +.PHONY: result +result: shell.nix + nix-build --arg nixpkgs 'import <stockholm>' ./shell.nix + +shell.nix: $(wildcard *.cabal) + cabal2nix --shell . > $@ |