2b31921c3e
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).
20 lines
768 B
Nix
20 lines
768 B
Nix
# This file sets up the top-level package set by merging all local
|
|
# packages into the nixpkgs top-level.
|
|
|
|
let
|
|
localPkgs = super: pkgs: {
|
|
tazjin.tazblog = import ./services/tazblog { inherit pkgs; };
|
|
tazjin.gemma = import ./services/gemma { inherit pkgs; };
|
|
|
|
thirdParty.gitAppraise = pkgs.callPackage ./third_party/go/git-appraise/git-appraise {};
|
|
};
|
|
|
|
# TODO(tazjin): It might be preferable to pin a specific commit of
|
|
# nixpkgs, but for now the assumption will be that a single release
|
|
# channel is reasonably stable.
|
|
nixpkgsVersion = "nixos-19.03";
|
|
nixpkgs = "https://github.com/NixOS/nixpkgs-channels/archive/${nixpkgsVersion}.tar.gz";
|
|
|
|
in { ... } @ args: import (builtins.fetchTarball nixpkgs) (args // {
|
|
overlays = [ localPkgs ];
|
|
})
|