lriamol/flake.nix

43 lines
965 B
Nix
Raw Normal View History

2023-10-25 13:08:37 -05:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2023-10-27 10:06:49 -05:00
naersk = {
url = "github:nix-community/naersk/master";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-10-25 13:08:37 -05:00
utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
utils,
naersk,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
naersk-lib = pkgs.callPackage naersk {};
in {
2023-10-27 10:06:49 -05:00
packages.default = naersk-lib.buildPackage ./.;
formatter = nixpkgs.legacyPackages.${system}.alejandra;
checks = {
inherit (self.packages.${system}) default;
2023-10-27 11:37:26 -05:00
# TODO: clippy
2023-10-27 10:06:49 -05:00
};
2023-10-25 13:08:37 -05:00
devShell = with pkgs;
mkShell {
buildInputs = [
cargo
rustc
rustfmt
pre-commit
rustPackages.clippy
rust-analyzer
];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};
});
}