ascendancy/flake.nix

40 lines
1 KiB
Nix

{
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"
];
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 =
let latestNightlyWith = pkgs.rust-bin.selectLatestNightlyWith;
in [
(latestNightlyWith (toolchain: toolchain.default.override {
extensions = [ "rust-src" ];
}))
];
};
});
};
}