From 584239a1a0c97f9d57f2de76c04708127178bceb Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 14 Jul 2020 20:29:53 -0700 Subject: dev: move some commands to shell --- nix/build.nix | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'nix/build.nix') diff --git a/nix/build.nix b/nix/build.nix index dd16df6..7335159 100644 --- a/nix/build.nix +++ b/nix/build.nix @@ -93,7 +93,37 @@ in { installPhase = "exit 0"; } // { env = ghcjs; }; - env = ghc_ allDeps; + env = mkShell { + name = "bizdev"; + buildInputs = [ + (ghc_ allDeps) + # this says something about missing haskelline? + #(ghcjs_ allDeps) + + nixpkgs.niv.niv + nixpkgs.hlint + nixpkgs.ormolu + nixpkgs.python37Packages.black + nixpkgs.python37Packages.pylint + nixpkgs.wemux + ]; + shellHook = '' + echo "bizdev" | ${nixpkgs.figlet}/bin/figlet | ${nixpkgs.lolcat}/bin/lolcat + echo "(be sure to run 'nix-shell' to get the build functions)" + echo "-------------------------------------------------------" + echo "" + + function repl() { + ghci -i$BIZ_ROOT -ghci-script "$BIZ_ROOT/.ghci" + } + + function deps() { + niv --sources-file $BIZ_ROOT/nix/sources.json $@ + } + + alias lint=$BIZ_ROOT/Biz/lint.py + ''; + }; os = cfg: (nixos (args: lib.attrsets.recursiveUpdate cfg { boot.cleanTmpDir = true; -- cgit v1.2.3