add riscv-overlay to riscv builds

This commit is contained in:
Charlotte 🦝 Delenk 2024-11-27 08:32:54 +01:00
parent dc7038b92c
commit f5286b8a8f
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
2 changed files with 48 additions and 12 deletions

View file

@ -91,12 +91,33 @@
"type": "github"
}
},
"riscv-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1732691666,
"narHash": "sha256-IjLKI/ifm5AolDMGuUUugFIdYYy+MP5q3HMa169gfCU=",
"owner": "DarkKirb",
"repo": "riscv-overlay",
"rev": "ac6bf799c2d2b1f281444b528841659f84492028",
"type": "github"
},
"original": {
"owner": "DarkKirb",
"repo": "riscv-overlay",
"type": "github"
}
},
"root": {
"inputs": {
"cargo2nix": "cargo2nix",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"riscv-overlay": "riscv-overlay",
"rust-overlay": "rust-overlay"
}
},

View file

@ -2,21 +2,26 @@
description = "rust-template";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
cargo2nix = {
url = "github:DarkKirb/cargo2nix/master";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.rust-overlay.follows = "rust-overlay";
};
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
riscv-overlay = {
url = "github:DarkKirb/riscv-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@ -26,6 +31,7 @@
flake-utils,
rust-overlay,
cargo2nix,
riscv-overlay,
...
}@inputs:
flake-utils.lib.eachSystem
@ -37,10 +43,19 @@
(
system:
let
overlays = [
cargo2nix.overlays.default
(import rust-overlay)
];
overlays =
[
cargo2nix.overlays.default
(import rust-overlay)
]
++ (
if system == "riscv64-linux" then
[
riscv-overlay.overlays.default
]
else
[ ]
);
pkgs = import nixpkgs {
inherit system overlays;
};