crafting-interpreters/rust/flake.nix

39 lines
850 B
Nix
Raw Normal View History

2025-02-06 11:34:46 +01:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix.url = "github:nix-community/fenix";
};
outputs =
{
nixpkgs,
fenix,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
fx = fenix.packages.${system};
rust = fx.combine [
2025-05-23 12:44:09 +02:00
(fx.fromToolchainFile {
file = ./rox/rust-toolchain.toml;
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
})
2025-02-06 11:34:46 +01:00
];
buildInputs = [
rust
pkgs.cargo-deny
pkgs.rust-analyzer
];
in
{
devShells.default = pkgs.mkShell {
buildInputs = buildInputs;
};
}
);
}