nyazoom/flake.nix

38 lines
1 KiB
Nix

{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, rust-overlay, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-darwin"
];
perSystem = { system, pkgs, ... }: {
_module.args.pkgs = (import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
});
devShells.default = import ./shell.nix {
inherit pkgs;
additionalBuildInputs = [
(pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
}))
];
};
};
};
}