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:
parent
d89e57a60c
commit
8d36bf6dec
2 changed files with 39 additions and 12 deletions
21
flake.lock
generated
21
flake.lock
generated
|
@ -19,9 +19,30 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"rust-overlay": "rust-overlay",
|
||||||
"systems": "systems"
|
"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": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689347949,
|
"lastModified": 1689347949,
|
||||||
|
|
30
flake.nix
30
flake.nix
|
@ -3,29 +3,35 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
systems.url = "github:nix-systems/default-linux";
|
systems.url = "github:nix-systems/default-linux";
|
||||||
|
rust-overlay = {
|
||||||
|
url = "github:oxalica/rust-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: let
|
outputs = inputs: let
|
||||||
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
|
inherit (inputs.nixpkgs) lib;
|
||||||
pkgsFor = inputs.nixpkgs.legacyPackages;
|
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 {
|
in {
|
||||||
packages = eachSystem (system: {
|
|
||||||
default = inputs.self.packages.${system}.ralc;
|
|
||||||
ralc = pkgsFor.${system}.callPackage ./nix/package.nix {};
|
|
||||||
});
|
|
||||||
|
|
||||||
devShells = eachSystem (system: {
|
devShells = eachSystem (system: {
|
||||||
default = pkgsFor.${system}.mkShell {
|
default = pkgsFor.${system}.mkShell {
|
||||||
packages = builtins.attrValues {
|
packages = builtins.attrValues {
|
||||||
inherit
|
inherit
|
||||||
(pkgsFor.${system})
|
(pkgsFor.${system}.rust-bin.nightly.latest)
|
||||||
cargo
|
cargo
|
||||||
rustc
|
rustc
|
||||||
rustfmt
|
rustfmt
|
||||||
bacon
|
|
||||||
;
|
|
||||||
inherit
|
|
||||||
(pkgsFor.${system}.rustPackages)
|
|
||||||
clippy
|
clippy
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue