mirror of
https://github.com/msfjarvis/clipboard-substitutor
synced 2025-08-14 22:27:03 +05:30
feat(nix): switch to provisioning toolchains using fenix
rust-overlay's `fromRustupToolchainFile` does not provision the provided components from the `rust-toolchain.toml` file which makes the experience subpar compared to fenix that treats `rust-toolchain.toml` similar to rustup.
This commit is contained in:
parent
bc1efaa7d0
commit
c0f86645bc
2 changed files with 59 additions and 23 deletions
28
flake.nix
28
flake.nix
|
@ -4,6 +4,13 @@
|
|||
inputs = {
|
||||
nixpkgs = {url = "github:NixOS/nixpkgs/nixpkgs-unstable";};
|
||||
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
flake-utils = {url = "github:numtide/flake-utils";};
|
||||
|
||||
flake-compat = {
|
||||
|
@ -11,21 +18,12 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
crane = {
|
||||
url = "github:ipetkov/crane";
|
||||
inputs = {
|
||||
flake-compat.follows = "flake-compat";
|
||||
flake-utils.follows = "flake-utils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
rust-overlay.follows = "rust-overlay";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,20 +36,20 @@
|
|||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
fenix,
|
||||
crane,
|
||||
flake-utils,
|
||||
advisory-db,
|
||||
rust-overlay,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [(import rust-overlay)];
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
|
||||
rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
|
||||
file = ./rust-toolchain.toml;
|
||||
sha256 = "sha256-eMJethw5ZLrJHmoN2/l0bIyQjoTX1NsvalWSscTixpI=";
|
||||
};
|
||||
|
||||
rustStable =
|
||||
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;
|
||||
commonArgs = {
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue