Files

60 lines
1.5 KiB
Nix
Raw Permalink Normal View History

{
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
2025-11-15 12:46:24 +01:00
flake-utils.url = "github:numtide/flake-utils";
alejandra = {
url = "github:kamadorueda/alejandra/4.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};
devenv = {
url = "github:cachix/devenv";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-11-15 12:46:24 +01:00
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
};
nixConfig = {
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"phundrak-dot-com.cachix.org-1:c02/xlCknJIDoaQPUzEWSJHPoXcmIXYzCa+hVRhbDgE="
];
extra-substituters = [
"https://devenv.cachix.org"
"https://phundrak-dot-com.cachix.org"
];
};
outputs = {
self,
nixpkgs,
2025-11-15 12:46:24 +01:00
flake-utils,
rust-overlay,
alejandra,
...
2025-11-15 12:46:24 +01:00
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
2025-11-15 12:46:24 +01:00
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {inherit system overlays;};
rustVersion = pkgs.rust-bin.stable.latest.default;
rustPlatform = pkgs.makeRustPlatform {
cargo = rustVersion;
rustc = rustVersion;
};
2025-11-15 12:46:24 +01:00
in {
formatter = alejandra.defaultPackage.${system};
packages = import ./nix/package.nix {inherit pkgs rustPlatform;};
devShell = import ./nix/shell.nix {
inherit inputs pkgs self rustVersion;
};
}
);
}