!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

221 Members
72 Servers

Load older messages


SenderMessageTime
5 Jan 2025
@emilazy:matrix.orgemilywhich is useful to debug things without rebuilding the world but was really unpleasant most of the time19:01:10
@emilazy:matrix.orgemilybasically ideally we shouldn't be deciding to filter at build time but on the viewing end19:01:23
@emilazy:matrix.orgemily(except for things so spammy that they might slow down a build appreciably to even shove through a pipe)19:01:35
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)Ahhhhh yeah! It’d be particularly nice if there were an option to always capture the most verbose output in a build log file on disk (which could be compressed) while the content printed out was filtered for the current log level19:02:21
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)lol agreed took me longer to type out the same thing19:02:50
@emilazy:matrix.orgemilyright.19:02:50
@emilazy:matrix.orgemilyI think most of the pieces are there already, it just needs implementing19:03:02
@emilazy:matrix.orgemilyhere's some historical context19:03:33
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/issues/328229 https://github.com/NixOS/nixpkgs/pull/331560 https://github.com/NixOS/nixpkgs/pull/33179419:03:51
@emilazy:matrix.orgemily

Both projects support structured output logging (through the @nix { "action": "msg", "level": "[0-7]", "msg": "some message" } special messages output to the file descriptor that $NIX_LOG_FD points to.

19:04:46
@emilazy:matrix.orgemilyIMO this would be very high value if someone managed to get it into Nix/Lix19:05:10
@emilazy:matrix.orgemily because rebuilding with a higher NIX_DEBUG just to check some build issue sucks 19:05:19
@emilazy:matrix.orgemilywe would have to check how much overhead even processing/storing/discarding the logs would be and there's even considerations like Hydra's web interface, but it would be really great19:05:39
@emilazy:matrix.orgemilyanyway, like I said enough of a task that it shouldn't block incremental improvements :)19:05:47
@emilazy:matrix.orgemilybut I don't think it would be an immense amount of implementation work and the benefits would be huge19:06:02
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)Wouldn’t that change need to be backported through Nix 2.3?19:48:29
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8)* Wouldn’t such changes need to be backported through Nix 2.3?19:49:40
@emilazy:matrix.orgemilyI don't think so – spammy build output isn't a compatibility break19:50:36
@emilazy:matrix.orgemily(but we should bump minver to 2.18 anyway, it was discussed on a recent structured attributes PR…)19:50:46
6 Jan 2025
@emilazy:matrix.orgemily how does stdenvNoCC get defined? I see a bunch of stdenvNoCC =s, of course, but I can't tell where the magic to stop it having a cc happens. 18:40:34
@emilazy:matrix.orgemily (in particular, I want to know one can condition the extraBuildInputs on cc-ness) 18:41:32
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/a8af4a1033a3ab6d14d37731512ecd8bbf39c2b9/pkgs/top-level/stage.nix#L54 https://github.com/NixOS/nixpkgs/blob/a8af4a1033a3ab6d14d37731512ecd8bbf39c2b9/pkgs/top-level/stage.nix#L148 https://github.com/NixOS/nixpkgs/blob/a8af4a1033a3ab6d14d37731512ecd8bbf39c2b9/pkgs/top-level/stage.nix#L35419:46:03
@emilazy:matrix.orgemilythanks19:47:57
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/a8af4a1033a3ab6d14d37731512ecd8bbf39c2b9/pkgs/top-level/default.nix#L153-L157 https://github.com/NixOS/nixpkgs/blob/a8af4a1033a3ab6d14d37731512ecd8bbf39c2b9/pkgs/stdenv/booter.nix#L100 stdenv comes from here maybe19:48:09
@emilazy:matrix.orgemily I guess the per-platform bootstrap stages don't necessarily know whether cc is going to be set in the stdenv? 🤔 19:48:16
@emilazy:matrix.orgemily

right now we do this kind of thing

      thisStdenv = import ../generic {
        name = "${name}-stdenv-darwin";

        buildPlatform = localSystem;
        hostPlatform = localSystem;
        targetPlatform = localSystem;

        inherit config;

        extraBuildInputs = [ prevStage.apple-sdk ];
        inherit extraNativeBuildInputs;
19:48:50
@emilazy:matrix.orgemily but including the SDK in stdenvNoCC pulls in a bunch of stuff 19:49:02
@reckenrode:matrix.orgRandy Eckenrode Did the old stdenvNoCC include CoreFoundation? 19:53:05
@reckenrode:matrix.orgRandy Eckenrode It’s picking up extraBuildPackages? 19:53:28
@reckenrode:matrix.orgRandy Eckenrode * It’s picking up extraBuildInputs? 19:53:40

Show newer messages


Back to Room ListRoom Version: 9