forked from hswaw/hscloud
This makes all Nix files addressable from root by file path. For instance, if a file is located in //foo/bar:baz.nix containing: { pkgs, ... }: pkgs.stdenv.mkDerivation { pname = "foo"; # ... } You can then do: nix-build -A foo.bar.baz All nix files loaded this way must be a function taking a 'config' attrset - see nix/readTree.nix for more information. Currently the config attrset contains the following fields: - hscloud: the root of the hscloud repository itself, which allows for traversal via readTree (eg. hscloud.foo.bar.baz) - pkgs: nixpkgs - pkgsSrc: nixpkgs souce/channel, useful to load NixOS modules. - lib, stdenv: lib and stdenv from pkgs. Change-Id: Ieaacdcabceec18dd6c670d346928bff08b66cf79 |
||
---|---|---|
.. | ||
readtree.nix |