chore: add nix
This commit is contained in:
parent
0a16d339a4
commit
499f13a634
7 changed files with 334 additions and 0 deletions
37
default.nix
Normal file
37
default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
rust-overlay ? import (import ./nix/flake-parse.nix "rust-overlay"),
|
||||
pkgs ? import (import ./nix/flake-parse.nix "nixpkgs") {
|
||||
system = builtins.currentSystem;
|
||||
overlays = [ rust-overlay ];
|
||||
},
|
||||
}:
|
||||
let
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
||||
extensions = [
|
||||
"rust-analyzer"
|
||||
"rust-src"
|
||||
"llvm-tools"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
shell = import ./nix/shell.nix {
|
||||
inherit pkgs rustToolchain;
|
||||
};
|
||||
|
||||
formatter = import ./nix/formatter.nix { inherit pkgs rustToolchain; };
|
||||
|
||||
packages =
|
||||
let
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
default = pkgs.callPackage ./nix/package.nix {
|
||||
inherit rustPlatform;
|
||||
};
|
||||
sessiond-seat = default;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue