mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 04:06:54 +00:00
fix: use toolchain declared in rust-toolchain.toml for cross rust-std
This commit is contained in:
2 files changed
+17
-12
No files matched your search
@@ -9,8 +9,10 @@
|
||||
self',
|
||||
lib,
|
||||
pkgs,
|
||||
inputs',
|
||||
system,
|
||||
craneLib,
|
||||
mkToolchain,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -19,7 +21,7 @@
|
||||
mkPackages =
|
||||
pkgs:
|
||||
let
|
||||
fnx = inputs.fenix.packages.${system};
|
||||
fnx = inputs'.fenix.packages;
|
||||
|
||||
isStatic = pkgs.stdenv.hostPlatform.isMusl;
|
||||
|
||||
@@ -28,7 +30,7 @@
|
||||
if isStatic then
|
||||
fnx.combine [
|
||||
self'.packages.stable-toolchain
|
||||
(fnx.targets.${pkgs.stdenv.hostPlatform.config}.stable).rust-std
|
||||
(mkToolchain fnx.targets.${pkgs.stdenv.hostPlatform.config}).rust-std
|
||||
]
|
||||
else
|
||||
self'.packages.stable-toolchain
|
||||
@@ -62,7 +64,6 @@
|
||||
in
|
||||
{
|
||||
inherit default max-perf max-perf-haswell;
|
||||
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
+13
-9
@@ -2,22 +2,26 @@
|
||||
{
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
lib,
|
||||
inputs',
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkToolchain =
|
||||
target:
|
||||
target.fromToolchainName {
|
||||
name = (lib.importTOML "${inputs.self}/rust-toolchain.toml").toolchain.channel;
|
||||
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
|
||||
};
|
||||
in
|
||||
{
|
||||
_module.args = { inherit mkToolchain; };
|
||||
|
||||
packages =
|
||||
let
|
||||
fnx = inputs.fenix.packages.${system};
|
||||
|
||||
stable-toolchain = fnx.fromToolchainFile {
|
||||
dir = inputs.self;
|
||||
|
||||
# See also `rust-toolchain.toml`
|
||||
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
|
||||
};
|
||||
fnx = inputs'.fenix.packages;
|
||||
stable-toolchain = (mkToolchain fnx).toolchain;
|
||||
in
|
||||
{
|
||||
inherit stable-toolchain;
|
||||
|
||||
Reference in new issue
Block a user