diff options
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r-- | Biz/Bild.nix | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix index 8e33d93..c24cecd 100644 --- a/Biz/Bild.nix +++ b/Biz/Bild.nix @@ -14,6 +14,19 @@ let unstable = nixpkgs.nixos-unstable-small; + # get the .src attributes of all drvs in each pkgset in the `sources` list, + # and concat them with `:` into a Unix-style search path. + # makeSourcesPath :: [pkgset] -> str + makeSourcesPath = with stable; + sources: + lib.trivial.pipe sources [ + (builtins.map lib.attrsets.attrValues) + lib.lists.flatten + (builtins.filter (pkg: pkg != null)) + (builtins.map (pkg: pkg.src)) + (lib.strings.concatStringsSep ":") + ]; + # this is the main library definitions, recursive references can be made with # `self.thing`, like in Python objects self = { @@ -68,7 +81,8 @@ let lisp = { sbclWith = stable.sbcl.withPackages; }; python = { - packages = stable.python3.pkgs; + packages = self.lib.attrsets.getAttrs (import ./Bild/Deps/Python.nix) + stable.python3.pkgs; pythonWith = stable.python3.withPackages; buildPythonApplication = stable.python3.pkgs.buildPythonApplication; }; @@ -83,8 +97,7 @@ let git-branchless gitlint groff guile hlint indent jq lolcat mypy nixfmt ormolu pkg-config ripgrep rustc tree wemux; llama-cpp = unstable.llama-cpp; - llm = python3.withPackages - (p: with p; [ p.llm-ollama ]); + llm = python3.withPackages (p: with p; [ p.llm-ollama ]); ollama = unstable.ollama; ruff = unstable.ruff; shellcheck = unstable.shellcheck; @@ -192,12 +205,18 @@ let llm ormolu ripgrep - stable.haskell.packages.${constants.ghcCompiler}.fast-tags tree wemux ]; shellHook = '' export GHC_PACKAGE_PATH=${self.bild}/lib/ghc-${self.haskell.ghcVersion}/package.conf.d + export ALL_SOURCES=${ + makeSourcesPath [ + self.python.packages + self.haskell.packages + self.c.packages + ] + } ''; }; |