Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit passthru platforms from nixpkgs' rustc to fix for latest nixpkgs #192

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flake.lock

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

16 changes: 14 additions & 2 deletions lib/mk-aggregated.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, symlinkJoin, pkgsTargetTarget, bash, curl }:
{ lib, stdenv, symlinkJoin, pkgsTargetTarget, bash, curl, rustc }:
{ pname, version, date, selectedComponents, availableComponents ? selectedComponents }:
let
inherit (lib) optional;
Expand All @@ -10,7 +10,19 @@ symlinkJoin {

paths = selectedComponents;

passthru = { inherit availableComponents; };
passthru = {
inherit availableComponents;

# These are used by `buildRustPackage` for default `meta`. We forward
# them to nixpkgs' rustc, or fallback to sane defaults. False-positive
# is better than false-negative which causes eval failures.
# See:
# - https://github.com/oxalica/rust-overlay/issues/191
# - https://github.com/NixOS/nixpkgs/pull/338999
targetPlatforms = rustc.targetPlatform or lib.platforms.all;
tier1TargetPlatforms = rustc.tier1TargetPlatforms or lib.platforms.all;
badTargetPlatforms = rustc.badTargetPlatforms or [ ];
};

# Ourselves have offset -1. In order to make these offset -1 dependencies of downstream derivation,
# they are offset 0 propagated.
Expand Down