fix(nix): Ensure package set is callable with/without args

When instantiating a Nix package via Bazel, the package set is called
with an empty map as the argument. From the Nix REPL or the dispatch
script, however, the package set is called without arguments.

This change adds a catch-all optional argument in the package set
which ensures that both use-cases are supported (similar to what
nixpkgs itself does).
This commit is contained in:
Vincent Ambo 2019-07-04 11:15:59 +01:00
parent af7cbf64e5
commit 2b31921c3e

View file

@ -15,6 +15,6 @@ let
nixpkgsVersion = "nixos-19.03";
nixpkgs = "https://github.com/NixOS/nixpkgs-channels/archive/${nixpkgsVersion}.tar.gz";
in import (builtins.fetchTarball nixpkgs) {
in { ... } @ args: import (builtins.fetchTarball nixpkgs) (args // {
overlays = [ localPkgs ];
}
})