48 lines
1 KiB
Nix
48 lines
1 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
naersk.url = "github:nix-community/naersk";
|
|
};
|
|
|
|
outputs = {
|
|
nixpkgs,
|
|
fenix,
|
|
flake-utils,
|
|
naersk,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system: let
|
|
pkgs = (import nixpkgs) {
|
|
inherit system;
|
|
overlays = [fenix.overlays.default];
|
|
};
|
|
naersk' = pkgs.callPackage naersk {};
|
|
in {
|
|
defaultPackage = naersk'.buildPackage {
|
|
src = ./.;
|
|
};
|
|
|
|
devShell = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [
|
|
hyperfine
|
|
python3
|
|
alejandra
|
|
rust-analyzer
|
|
(pkgs.fenix.stable.withComponents [
|
|
"cargo"
|
|
"clippy"
|
|
"rust-src"
|
|
"rustc"
|
|
"rustfmt"
|
|
])
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|