about summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-07-04T10·15+0100
committerVincent Ambo <tazjin@google.com>2019-07-04T10·15+0100
commit2b31921c3e95671d22bd4ff2a2afaf3b805f0f4b (patch)
treeb05f057f54e557434a2e8cab51821bc6081da814 /default.nix
parentaf7cbf64e5668533ad3184e10c1a6668045b790d (diff)
fix(nix): Ensure package set is callable with/without args r/15
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).
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index 3904ced8c728..771128a8a9f2 100644
--- a/default.nix
+++ b/default.nix
@@ -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 ];
-}
+})