From 2b31921c3e95671d22bd4ff2a2afaf3b805f0f4b Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 4 Jul 2019 11:15:59 +0100 Subject: 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). --- default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 3904ced8c7..771128a8a9 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 ]; -} +}) -- cgit 1.4.1