Skip to content

Commit

Permalink
use oxalica/rust-overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed Sep 13, 2024
1 parent 5253ef0 commit e1f298b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 53 deletions.
40 changes: 22 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
inputs.nixpkgs-mozilla = {
url = "github:mozilla/nixpkgs-mozilla";
flake = false;
inputs.rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
inputs.nur.url = "github:nix-community/NUR";
inputs.flake-utils.url = "github:numtide/flake-utils";
Expand Down
2 changes: 1 addition & 1 deletion nixpkgs/rust-overlay.nix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ nixpkgs-mozilla, ... }: import "${nixpkgs-mozilla}/rust-overlay.nix"
{ rust-overlay, ... }: rust-overlay.overlays.default
60 changes: 29 additions & 31 deletions pkgs/rust/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
{
rustChannelOf,
rust-bin,
lowPrio,
small ? false,
}:

rec {
channel = rustChannelOf {
channel = "nightly";
date = "2023-11-02";
sha256 = "sha256-LEzmVt0K3MeZe61P051wMlvhtLMKW5lk5ZvhULpRlv0=";
};
rust = channel.rust.override {
extensions = [
"clippy-preview"
"rust-src"
"rust-analysis"
];
targets =
if small then
[ "x86_64-unknown-linux-gnu" ]
else
[
"x86_64-unknown-linux-gnu"
"x86_64-unknown-linux-musl"
"armv7-linux-androideabi"
"armv7-unknown-linux-musleabihf"
"thumbv6m-none-eabi"
"thumbv7m-none-eabi"
"thumbv7em-none-eabi"
"thumbv7em-none-eabihf"
"wasm32-unknown-unknown"
"x86_64-unknown-linux-musl"
"riscv64gc-unknown-none-elf"
"riscv32imc-unknown-none-elf"
];
};
rust = rust-bin.selectLatestNightlyWith (
toolchain:
toolchain.default.override {
extensions = [
"clippy-preview"
"rust-src"
"rust-analysis"
];
targets =
if small then
[ "x86_64-unknown-linux-gnu" ]
else
[
"x86_64-unknown-linux-gnu"
"x86_64-unknown-linux-musl"
"armv7-linux-androideabi"
"armv7-unknown-linux-musleabihf"
"thumbv6m-none-eabi"
"thumbv7m-none-eabi"
"thumbv7em-none-eabi"
"thumbv7em-none-eabihf"
"wasm32-unknown-unknown"
"x86_64-unknown-linux-musl"
"riscv64gc-unknown-none-elf"
"riscv32imc-unknown-none-elf"
];
}
);
}

0 comments on commit e1f298b

Please sign in to comment.