!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

220 Members
70 Servers

Load older messages


SenderMessageTime
6 Nov 2024
@frontear:matrix.orgfrontear is there any documentation (of really any kind) in regards to the inner working on how stdenv works? I find it a little bit difficult to follow the many multiple levels of nix code in nixpkgs, and was wondering if any kind of documentation exists, such as how the process works especially for cross environments 23:03:17
@artturin:matrix.orgArtturin
In reply to @frontear:matrix.org
is there any documentation (of really any kind) in regards to the inner working on how stdenv works? I find it a little bit difficult to follow the many multiple levels of nix code in nixpkgs, and was wondering if any kind of documentation exists, such as how the process works especially for cross environments
The cross part is easy because you do not have to deal with bootstrapping
23:04:09
@artturin:matrix.orgArtturin

Here's some crumbs I sent to someone before

nix build -vvvvvvvv ".#stdenv" gives a good overview by listing which files are evaluated first

'default.nix'
'pkgs/top-level/impure.nix'
'pkgs/top-level/default.nix'
'pkgs/stdenv/booter.nix'
'pkgs/stdenv/default.nix'
'pkgs/top-level/config.nix'
'pkgs/stdenv/linux/default.nix'
'pkgs/stdenv/linux/bootstrap-tools/default.nix'
'pkgs/stdenv/linux/bootstrap-tools/glibc.nix'
'pkgs/top-level/stage.nix'
'pkgs/stdenv/adapters.nix'
'pkgs/build-support/trivial-builders/default.nix'
'pkgs/top-level/splice.nix'
'pkgs/top-level/by-name-overlay.nix'
'pkgs/top-level/all-packages.nix'
'pkgs/top-level/aliases.nix'
'pkgs/stdenv/generic/default.nix'
'pkgs/build-support/bintools-wrapper/default.nix'
'pkgs/stdenv/generic/make-derivation.nix'
'pkgs/development/tools/misc/binutils/default.nix'
'pkgs/servers/x11/xorg/default.nix'
'pkgs/servers/x11/xorg/overrides.nix'
'pkgs/build-support/cc-wrapper/default.nix'
'pkgs/stdenv/generic/check-meta.nix'

(edited the lib files out)
(xorg is there because of https://github.com/NixOS/nixpkgs/blob/0d2ff894cb4d1bcb1b5006aa68c8cc87051b7741/pkgs/top-level/splice.nix#L125)

https://github.com/NixOS/nixpkgs/blob/0d2ff894cb4d1bcb1b5006aa68c8cc87051b7741/pkgs/top-level/stage.nix#L308-L316

23:05:53
@artturin:matrix.orgArtturin

I sent to someone

Literally SomeoneSerge (utc+3)

23:06:43
@artturin:matrix.orgArtturinhaha23:06:48
@frontear:matrix.orgfrontearappreciated looks like need to write down some notes as i read these thank you23:10:18
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/default.nix23:11:19
@artturin:matrix.orgArtturinvs cross https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/cross/default.nix23:11:31
@artturin:matrix.orgArtturin699 lines vs 10723:11:41
@frontear:matrix.orgfrontear honestly i expected the complete opposite 23:12:00
@frontear:matrix.orgfrontear id expected cross setup to be more difficult 23:12:11
@artturin:matrix.orgArtturinThe hard work of bootstrapping is done in the native stages23:12:37
@artturin:matrix.orgArtturinSo cross is mostly just compiling packages like normal23:13:28
7 Nov 2024
@trofi:matrix.org@trofi:matrix.org Yeah. It still needs to build cross-gcc twice (and arguably does it slightly incorrectly WRT libgcc.so), but it's not as involved as native tools are already there (and use native bootstrap). 16:56:46
8 Nov 2024
@artur:glasgow.socialmoved to @amadaluzia:tchncs.de changed their display name from (artur 'manuel) to moved to @amadaluzia:tchncs.de.14:29:49
9 Nov 2024
@emilazy:matrix.orgemily is doing stdenv.override { whateverPlatform = …; } meant to work? 08:43:56
@emilazy:matrix.orgemilyit seems to not regenerate wrappers or anything08:44:00
@emilazy:matrix.orgemily(looking for an LLVM stdenv that targets a different platform. I assume this should not require rebuilding all of LLVM since it's multi-target)08:49:12
@artturin:matrix.orgArtturin
In reply to @emilazy:matrix.org
it seems to not regenerate wrappers or anything
CC not overriden automatically
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/default.nix
you'll have to pass CC yourself https://github.com/NixOS/nixpkgs/blob/a31f2a7b37f2c0cc463768c2637413838da0f35b/pkgs/stdenv/cross/default.nix#L83
14:48:04
@emilazy:matrix.orgemilyright14:48:25
@emilazy:matrix.orgemily it seemed like I'd need multiple layers of nested overrides and I resorted to pkgsCross in the end 14:48:43
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
is doing stdenv.override { whateverPlatform = …; } meant to work?
Oh, that might explain why I see the Flutter engine update script not working after the changes with the platform attributes and using the ones from stdenv.
15:46:11
@emilazy:matrix.orgemilyhm?15:46:27
@emilazy:matrix.orgemilywhat changes?15:46:30
@rosscomputerguy:matrix.orgTristan RossThe ones that changes the consumption of `*Platform` -> `stdenv.*Platform`15:47:12
@rosscomputerguy:matrix.orgTristan RossI think Artturin did that PR15:47:26
@rosscomputerguy:matrix.orgTristan RossIt seems to have messed up the source fetching since Flutter engine sources are based on host and target.15:48:03
@rosscomputerguy:matrix.orgTristan RossI tried fixing it with overriding stdenv but that didn't help15:48:33
@emilazy:matrix.orgemilythat seems really unlikely15:49:18
@emilazy:matrix.orgemilythere's no semantic difference15:49:22

Show newer messages


Back to Room ListRoom Version: 9