Files
wordlers/flake.nix
Slendi e980f7a46e stuff
Signed-off-by: Slendi <slendi@socopon.com>
2025-09-09 01:01:00 +03:00

71 lines
1.4 KiB
Nix

{
description = "Rust flake";
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
flake-utils,
fenix,
...
}:
let
overlay =
final: prev:
let
fenixPkgs = fenix.packages.${final.system};
in
{
rustToolchain =
with fenixPkgs;
combine (
with stable;
[
clippy
rustc
cargo
rustfmt
rust-src
]
);
};
in
{
overlays.default = overlay;
}
// flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ overlay ];
};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
rustToolchain
openssl
pkg-config
cargo-deny
cargo-edit
cargo-watch
rust-analyzer
];
shellHook = ''
export RUST_SRC_PATH="${pkgs.rustToolchain}/lib/rustlib/src/rust/library"
'';
};
}
);
}