-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Remove cruft from platform descriptions #34274
Copy link
Copy link
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on9.needs: documentationThis needs to be documented well.This needs to be documented well.
Description
Simply put, I should be able to do
$ nix-build '<nixpkgs>' --arg crossSystem '{ config = "aarch64-unknown-linux-gnu"; }' -A stdenv
and that should work. I could make it work right now with a dirty white-list and fall-backs, but that's kind of defeats the point.
Currently, the biggest culprits are
- Random top-level fields, like
withTLSandopenssl.system. See https://github.com/NixOS/nixpkgs/blob/master/lib/systems/examples.nix - The
platformfield, see https://github.com/NixOS/nixpkgs/blob/master/lib/systems/platforms.nix archwhich overlaps with the far more principledparsed,arch. Seeelaboratehttps://github.com/NixOS/nixpkgs/blob/master/lib/systems/default.nix#L17.
The general design issue is we need to handle the per-package random crap in a more modular way, without giving up the possibility of the user to override with their own values. My GNU ld emulation picking logic at https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/bintools-wrapper/default.nix#L167-L179 is certainly in a more modular location, but also cannot be nicely overridden.
Checklist
- lib, glibc: Get rid of withTLS #34303:
withTLS - lib: Platform attribute cleanup #34315:
bigEndian,openssl.system - [RDY] buildLinux: Add more overrides #34351: linux kernel cleanups
- lib: Clean up how linux and gcc config is specified #107214 / top-level, lib: Remove platform attribute of platforms #110544: A few cleanups:
- Get rid of nesting items under
platformsfor no good reason - group linux config fields rather than merely prefixing them
- improve defaulting logic so
configis enough in more cases.
- Get rid of nesting items under
- Combine/rerrange
platforms.nixandexamples.nix- We should only default to generic/"multiplatform" settings; specific machines should be specified by hand.
- Specific machines shouldn't be partly in
platforms.nixand partly inexamples.nix, that is just confusing.
- Update manual to show how indeed the
configis usually enough, and remove the reference to this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on9.needs: documentationThis needs to be documented well.This needs to be documented well.
Fields
Give feedbackNo fields configured for issues without a type.