forked from divnix/nix-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
30 lines (28 loc) · 892 Bytes
/
flake.nix
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
28
29
30
{
description = "Nix-book";
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, utils }:
let
localOverlay = import ./nix/overlay.nix;
pkgsForSystem = system: import nixpkgs {
overlays = [
localOverlay
];
inherit system;
};
in utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ] (system: rec {
legacyPackages = pkgsForSystem system;
packages = utils.lib.flattenTree {
inherit (legacyPackages) devShell nix-book;
};
defaultPackage = packages.nix-book;
apps.nix-book = utils.lib.mkApp { drv = packages.nix-book; };
hydraJobs = { inherit (legacyPackages) nix-book; };
checks = { inherit (legacyPackages) nix-book; };
}) // {
overlay = localOverlay;
};
}