-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
27 lines (25 loc) · 759 Bytes
/
Copy pathdefault.nix
File metadata and controls
27 lines (25 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
let
npins = import ./npins;
mkPackages = pkgs: {
# Pass src explicitly: snail-demo.nix has a `src` formal arg, and without
# this callPackage would fill it from pkgs.src (a throwing alias).
snail-demo = pkgs.callPackage ./nix/snail-demo.nix { src = ./.; };
};
# Scoped against `final` so packages can reference each other; lazy, so no
# infinite recursion. Consumers apply this overlay to their own pkgs to get
# snail's packages by name.
overlay = final: _prev: mkPackages final;
in
{
nixpkgs ? npins.nixpkgs,
pkgs ? import nixpkgs { },
}:
let
finalPkgs = pkgs.extend overlay;
in
{
packages = mkPackages finalPkgs;
inherit overlay;
shell = import ./shell.nix { pkgs = finalPkgs; };
default = finalPkgs.snail-demo;
}