1
Fork 0
mirror of https://github.com/RGBCube/dix synced 2025-07-27 03:37:45 +00:00

flake: add rust-overlay for nightly rust

This commit is contained in:
Bloxx12 2025-05-09 11:56:26 +02:00
parent d89e57a60c
commit 8d36bf6dec
No known key found for this signature in database
2 changed files with 39 additions and 12 deletions

21
flake.lock generated
View file

@ -19,9 +19,30 @@
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay",
"systems": "systems"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1746758179,
"narHash": "sha256-JECUw1YBEsTsVauvupRzE5ykZaJoyhHCpoY87ZZJGas=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4fd00513eac6b6140c5dced3e1b8133e2369a0f8",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,

View file

@ -3,29 +3,35 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs: let
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
pkgsFor = inputs.nixpkgs.legacyPackages;
inherit (inputs.nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
eachSystem = lib.genAttrs systems;
pkgsFor = eachSystem (system:
import inputs.nixpkgs {
localSystem.system = system;
overlays = [(import inputs.rust-overlay)];
});
in {
packages = eachSystem (system: {
default = inputs.self.packages.${system}.ralc;
ralc = pkgsFor.${system}.callPackage ./nix/package.nix {};
});
devShells = eachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = builtins.attrValues {
inherit
(pkgsFor.${system})
(pkgsFor.${system}.rust-bin.nightly.latest)
cargo
rustc
rustfmt
bacon
;
inherit
(pkgsFor.${system}.rustPackages)
clippy
;
};