nyazoom/flake.nix

40 lines
986 B
Nix
Raw Normal View History

2024-08-28 22:05:40 +00:00
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, rust-overlay, ... }:
let
# System types to support.
supportedSystems = [
"x86_64-linux"
2024-11-15 18:12:44 +00:00
"aarch64-darwin"
2024-08-28 22:05:40 +00:00
];
forAllSystems = function: nixpkgs.lib.genAttrs supportedSystems
(system: function (import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
}));
in
{
devShells = forAllSystems
(pkgs: {
default = import ./shell.nix {
inherit pkgs;
additionalBuildInputs = [
2024-11-14 01:56:52 +00:00
(pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
extensions = [ "rust-src" ];
}))
2024-08-28 22:05:40 +00:00
];
};
});
};
}