diff options
-rwxr-xr-x | Biz/lint.py (renamed from lint) | 0 | ||||
-rw-r--r-- | default.nix | 2 | ||||
-rwxr-xr-x | deps | 2 | ||||
-rw-r--r-- | nix/build.nix | 32 | ||||
-rwxr-xr-x | repl | 4 | ||||
-rw-r--r-- | shell.nix | 23 |
6 files changed, 33 insertions, 30 deletions
diff --git a/default.nix b/default.nix index 32f9952..237a6da 100644 --- a/default.nix +++ b/default.nix @@ -87,7 +87,7 @@ in rec { Que.Server = build.ghc ./Que/Server.hs; Que.Website = build.ghc ./Que/Website.hs; # Development environment - repl = build.env; + env = build.env; # Fall through to any of our overlay packages inherit nixpkgs; } @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -niv --sources-file $BIZ_ROOT/nix/sources.json "$@" 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; @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -ex -nix run -f $BIZ_ROOT/default.nix "repl" \ - -c ghci -i$BIZ_ROOT -ghci-script "$BIZ_ROOT/.ghci" @@ -1,22 +1 @@ -{ - isDevelopmentShell ? true -}: - -let - nixpkgs = import ./nix/default.nix; - basepkgs = import ./Biz/packages.nix { inherit (nixpkgs) pkgs; }; - devpkgs = with nixpkgs; [ - hlint - #niv - ormolu - python37Packages.black - python37Packages.pylint - wemux - ]; -in nixpkgs.mkShell { - name = "bizdev"; - buildInputs = devpkgs; - shellHook = '' - echo "biz" | ${nixpkgs.figlet}/bin/figlet | ${nixpkgs.lolcat}/bin/lolcat - ''; -} +(import ./default.nix).env |