summaryrefslogtreecommitdiff
path: root/Biz/Bild.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r--Biz/Bild.nix59
1 files changed, 30 insertions, 29 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index bcb1940..798a0dc 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -1,8 +1,8 @@
{ nixpkgs ? import ./Bild/Nixpkgs.nix }:
-with nixpkgs;
let
+ inherit (nixpkgs) lib stdenv;
ghcCompiler = "ghc884";
ghcjsCompiler = "ghcjs86";
@@ -25,8 +25,8 @@ let
haskellDeps = hpkgs: import ./Bild/Deps/Haskell.nix hpkgs;
- mkGhcPackageSet = pkgs.haskell.packages.${ghcCompiler}.ghcWithHoogle;
- #mkGhcjsPackageSet = pkgs.haskell.packages.${ghcjsCompiler}.ghcWithPackages;
+ mkGhcPackageSet = nixpkgs.haskell.packages.${ghcCompiler}.ghcWithHoogle;
+ #mkGhcjsPackageSet = nixpkgs.haskell.packages.${ghcjsCompiler}.ghcWithPackages;
in rec {
# gather data needed for compiling by analyzing the main module
@@ -71,7 +71,7 @@ in rec {
in stdenv.mkDerivation {
name = data.module;
src = ../.;
- nativeBuildInputs = [ ghc ] ++ selectAttrs data.sysdeps nixpkgs;
+ nativeBuildInputs = [ ghc ] ++ selectAttrs data.sysdeps nixpkgs.pkgs;
strictDeps = true;
buildPhase = ''
mkdir -p $out/bin
@@ -106,15 +106,15 @@ in rec {
# -main-is ${data.module} \
# -o ${data.out}
# # optimize js output
- # ${pkgs.closurecompiler}/bin/closure-compiler \
+ # ${nixpkgs.pkgs.closurecompiler}/bin/closure-compiler \
# ${data.out}/all.js > $out/static/${data.out}
# '';
# installPhase = "exit 0";
# } // { env = ghcjs; };
- env = mkShell {
+ env = pkgs.mkShell {
name = "bizdev";
- buildInputs = [
+ buildInputs = with nixpkgs.pkgs; [
# haskell deps
(mkGhcPackageSet haskellDeps)
# ghcjs doesn't need everything, and many things fail to build
@@ -131,38 +131,39 @@ in rec {
#]))
# python deps
- (nixpkgs.python38.withPackages (p:
+ (python38.withPackages (p:
[ p.black p.pylint ]))
# tools
- nixpkgs.haskell.packages.${ghcCompiler}.apply-refact
- nixpkgs.cmark
- nixpkgs.figlet
- nixpkgs.haskell.packages.${ghcCompiler}.fast-tags
- nixpkgs.hlint
- nixpkgs.lolcat
- nixpkgs.niv.niv
- nixpkgs.nixops
- nixpkgs.ormolu
- nixpkgs.python37Packages.black
- nixpkgs.python37Packages.pylint
- nixpkgs.shellcheck
- nixpkgs.wemux
- nixpkgs.gmnisrv
- nixpkgs.gmni
- (pkgs.writeScriptBin "ftags" (builtins.readFile ./Ide/ftags.sh))
+ haskell.packages.${ghcCompiler}.apply-refact
+ cmark
+ figlet
+ haskell.packages.${ghcCompiler}.fast-tags
+ hlint
+ lolcat
+ niv.niv
+ nixops
+ ormolu
+ python37Packages.black
+ python37Packages.pylint
+ shellcheck
+ wemux
+ gmnisrv
+ gmni
] ++ lib.optional nixpkgs.stdenv.isLinux [
# scheme deps (i think these are broken on macOS)
- nixpkgs.guile
- nixpkgs.inspekt3d
- nixpkgs.libfive
+ guile
+ inspekt3d
+ libfive
- nixpkgs.ccze
+ ccze
];
shellHook = ". ${./Bild/ShellHook.sh}";
};
- os = cfg: (nixos (args: cfg)).toplevel;
+ os = cfg: (nixpkgs.nixos (args: cfg)).toplevel;
sources = nixpkgs.sources;
+
+ pkgs = nixpkgs.pkgs;
}