-
Notifications
You must be signed in to change notification settings - Fork 15
/
flake.nix
53 lines (49 loc) · 1.25 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "Terminal UI to list, browse and run APIs defined with OpenAPI v3.0 spec";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default-linux";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
fenix,
systems,
flake-utils,
...
} @ inputs: let
inherit (nixpkgs) lib;
eachSystem = lib.genAttrs (import systems);
pkgsFor = eachSystem (
system: let
systemPkgs = import nixpkgs {
inherit system;
overlays = [
fenix.overlays.default
];
};
in
systemPkgs
// {
myPackage = import ./nix/default.nix {
inherit system;
pkgs = systemPkgs;
lockFile = ./Cargo.lock;
fenix = fenix;
};
}
);
in {
packages = eachSystem (system: {
openapi-tui = pkgsFor.${system}.myPackage;
default = pkgsFor.${system}.myPackage;
});
checks = eachSystem (system: self.packages.${system});
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
};
}