-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
42 lines (38 loc) · 1.08 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
{
inputs = {
cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
flake-utils.follows = "cargo2nix/flake-utils";
nixpkgs.follows = "cargo2nix/nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, cargo2nix, rust-overlay, ... }:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ cargo2nix.overlays.default rust-overlay.overlays.default ];
};
rustPkgs = pkgs.rustBuilder.makePackageSet {
rustVersion = "1.70.0";
packageFun = import ./Cargo.nix;
extraRustComponents = [
"clippy"
"rustfmt"
];
};
in
{
packages.x86_64-linux = rec {
fel = (rustPkgs.workspace.fel { });
};
devShells."x86_64-linux".default = (rustPkgs.workspaceShell {
nativeBuildInputs = [
cargo2nix.packages.x86_64-linux.default
pkgs.go-containerregistry
# Native dependencies for git2
pkgs.pkg-config
pkgs.libgit2
pkgs.openssl
];
});
};
}