!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

230 Members
75 Servers

Load older messages


SenderMessageTime
28 Oct 2024
@emilazy:matrix.orgemilyhttps://hydra.nixos.org/build/274236521/nixlog/100:20:12
@emilazy:matrix.orgemilyit's a Hydra problem.00:20:14
@emilazy:matrix.orgemilywe could fix it in stdenv still, but it seems like the wrong place if actually the daemon stuff works00:20:55
@emilazy:matrix.orgemily so → #infra:nixos.org 00:21:00
31 Oct 2024
@frontear:matrix.orgfrontear joined the room.04:24:00
5 Nov 2024
@p14:matrix.orgp14

I was hoping replaceStdenv would act in a way to replace the stdenv; but not of buildPackages. What I see is that cmake appears to be built with my replacement stdenv, which is not quite what I expected. My next gambit was to use crossSystem but if I have localSystem == crossSystem, then buildPackages == pkgs and the cross machinery doesn’t kick in.

My next gambit was to use stdenvStages but it looks like replaceStdenv is already implemented in exactly the way I was thinking to add a build stage.

I would like a way to construct a package set with a custom compiler but to keep buildPackages as a standard set of packages. Is that doable somehow?

14:18:45
@artturin:matrix.orgArtturin
In reply to @p14:matrix.org

I was hoping replaceStdenv would act in a way to replace the stdenv; but not of buildPackages. What I see is that cmake appears to be built with my replacement stdenv, which is not quite what I expected. My next gambit was to use crossSystem but if I have localSystem == crossSystem, then buildPackages == pkgs and the cross machinery doesn’t kick in.

My next gambit was to use stdenvStages but it looks like replaceStdenv is already implemented in exactly the way I was thinking to add a build stage.

I would like a way to construct a package set with a custom compiler but to keep buildPackages as a standard set of packages. Is that doable somehow?

replaceCrossStdenv
14:22:42
@artturin:matrix.orgArtturin😄14:22:52
@p14:matrix.orgp14I tried using replaceCrossStdenv but as I tried to say above, it does not take effect when localsystem is crosssystem14:23:30
@p14:matrix.orgp14So is there a way to use the cross system machinery when targeting local?14:23:41
@p14:matrix.orgp14Ha. I just needed to make the systems not equal. So adding crossSystem.custom = true seems to be enough to trigger it. Maybe this will work! The rebuilt set of packages looks promising.14:27:14
@p14:matrix.orgp14Annoyingly it looks like it is rebuilding gcc.14:27:41
@p14:matrix.orgp14Right, looks like because the compiler package name gets annotated with the cross triple, even though it is redundant in this case.14:28:59
@p14:matrix.orgp14Of course I can fix this up by making replaceCrossStdenv use the buildPackages compiler. Nice! Looks like I have what I want now…14:30:43
@p14:matrix.orgp14Found a case where it borks, firefox refuses to eval with unsupported platforms in wasilibc, because it has meta platforms = wasm*. Odd. The non-cross version is fine as expected.14:38:00
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.orgtrofi 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

Show newer messages


Back to Room ListRoom Version: 9