nix: use rustoverlay; thanks nullcube <3

Zynh Ludwig 2024-07-29 22:38:22 -07:00
parent 6274984e18
commit ca9aec6e64
1 changed files with 21 additions and 3 deletions

View File

@ -3,9 +3,27 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs }: { outputs = { nixpkgs, rust-overlay, ... }:
devShells.x86_64-linux.default = import ./shell.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; }; let
# System types to support.
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = function: nixpkgs.lib.genAttrs supportedSystems
(system: function (import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
}));
in
{
devShells = forAllSystems (pkgs: import ./shell.nix { inherit pkgs; });
}; };
} }