nix: use rustoverlay; thanks nullcube <3
This commit is contained in:
parent
6274984e18
commit
bc7569ecee
2 changed files with 43 additions and 4 deletions
23
flake.lock
23
flake.lock
|
@ -18,7 +18,28 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722305989,
|
||||
"narHash": "sha256-ljiuTGSFuEtudqFqp/5Wr1OuEsVCjur/F2CmlNujSjc=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "38c2f156fca1868c8be7195ddac150522752f6ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
22
flake.nix
22
flake.nix
|
@ -3,9 +3,27 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
devShells.x86_64-linux.default = import ./shell.nix { pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
||||
outputs = { nixpkgs, rust-overlay, ... }:
|
||||
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: { default = import ./shell.nix { inherit pkgs; }; });
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue