-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
51 lines (43 loc) · 1.34 KB
/
flake.nix
File metadata and controls
51 lines (43 loc) · 1.34 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
description = "A general code formatter based on tree-sitter.";
nixConfig = {
extra-substituters = [
"https://tweag-topiary.cachix.org"
];
extra-trusted-public-keys = [
"tweag-topiary.cachix.org-1:8TKqya43LAfj4qNHnljLpuBnxAY/YwEBfzo3kzXxNY0="
];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
rust-overlay.url = "github:oxalica/rust-overlay";
advisory-db = {
url = "github:rustsec/advisory-db";
flake = false;
};
};
outputs =
{ nixpkgs, ... }@inputs:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
# NOTE: This flake is only a wrapper providing dependencies lock and
# interface. All the logic lives in the `nix` directory. We import it here
# bundled for all systems as a `topiaryNix`.
topiaryNix = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
import ./nix {
inherit pkgs;
inherit (inputs) advisory-db crane rust-overlay;
}
);
in
{
packages = forAllSystems (system: topiaryNix.${system}.packages);
checks = forAllSystems (system: topiaryNix.${system}.checks);
devShells = forAllSystems (system: topiaryNix.${system}.devShells);
};
}