initial commit
This commit is contained in:
41
flake.nix
Normal file
41
flake.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
defaultSystems = [
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
forAllDefaultSystems = f: nixpkgs.lib.genAttrs defaultSystems (system: f system);
|
||||
in
|
||||
{
|
||||
devShells = forAllDefaultSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
#default = self.devShells."${system}".;
|
||||
|
||||
rust = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
gcc
|
||||
rustfmt
|
||||
clippy
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
formatter = forAllDefaultSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user