-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
72 lines (69 loc) · 1.91 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
description = "Packages and tooling for bgpfu";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
jetez-src = {
url = "github:juniper/jetez/v1.0.7";
flake = false;
};
nightly-manifest = {
url = "https://static.rust-lang.org/dist/channel-rust-nightly.toml";
flake = false;
};
stable-manifest = {
url = "https://static.rust-lang.org/dist/channel-rust-stable.toml";
flake = false;
};
msrv-manifest = {
url = "https://static.rust-lang.org/dist/channel-rust-1.75.toml";
flake = false;
};
advisory-db = {
url = "github:rustsec/advisory-db";
flake = false;
};
};
outputs = { self, ... } @ inputs:
inputs.flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import inputs.nixpkgs {
inherit system;
};
platforms = import ./nix/platforms {
inherit pkgs;
inherit (inputs) jetez-src;
};
rust = import ./nix/rust {
inherit pkgs platforms;
inherit (inputs)
crane fenix
nightly-manifest stable-manifest msrv-manifest
advisory-db;
};
in
{
inherit (rust) checks;
packages = with platforms; rec {
cli = rust.buildPackage {
pname = "bgpfu-cli";
bin = "bgpfu";
};
junos-agent = rust.buildPackage {
pname = "bgpfu-junos-agent";
defaultPlatform = x86_64-junos-freebsd;
extraPlatforms = [ native ];
};
default = cli;
};
});
}