!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

229 Members
75 Servers

Load older messages


SenderMessageTime
6 Jan 2025
@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
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/issues/37146519:54:30
@reckenrode:matrix.orgRandy EckenrodeI saw the issue. Was this not a problem no one noticed before because it was just the CoreFoundation headers and stubs?19:55:11
@reckenrode:matrix.orgRandy Eckenrode * 19:55:41
@reckenrode:matrix.orgRandy Eckenrode The SDK pulls in a toolchain because it symlinks some stuff in $DEVELOPER_DIR/usr/bin because Chromium. 19:57:06
@reckenrode:matrix.orgRandy Eckenrode Isn’t the easy fix to drop extraBuildInputs on Darwin? 19:57:40
@reckenrode:matrix.orgRandy Eckenrode * Isn’t the easy fix to drop extraBuildInputs from stdenvNoCC on Darwin? 19:57:56
@emilazy:matrix.orgemilyyes19:58:31
@emilazy:matrix.orgemilyI was trying to figure out how to do this19:58:34
@emilazy:matrix.orgemily https://github.com/NixOS/nixpkgs/pull/371539 it evals, trying a build on x86_64-darwin, looks like there's some unrelated darwin.libffi fallout on AArch64 20:00:53
7 Jan 2025
@tomasajt:matrix.orgTomaWould appreciate some feedback https://github.com/NixOS/nixpkgs/pull/371613 this is partially based on some earlier conversations which I don't have the time to find right now, but I think amjoseph was part of it00:19:15
@emilazy:matrix.orgemilyoh I will have a lot of opinions about this00:20:49
@emilazy:matrix.orgemilyfwiw there is also https://github.com/NixOS/nixpkgs/pull/29676900:21:05
@emilazy:matrix.orgemily my #1 request: do the depsInPath/deps thing, but make them attribute sets, and have overrides work by the name 00:21:59
@emilazy:matrix.orgemily e.g., deps = { inherit (pkgsOnHost) zlib ffmpeg; } but deps = { inherit (pkgsOnHost) zlib; ffmpeg = pkgsOnHost.ffmpeg_7; boost = pkgsOnHost.boost179; } 00:22:35
@emilazy:matrix.orgemily this (a) gets rid of with footguns and (b) gets rid of the "put version pins in all-packages.nix for sane overriding interface, or in the package for locality" dilemma 00:22:59
@emilazy:matrix.orgemily I'd also suggest not bundling the package sets under finalAttrs. just do something like e.g. mkDerivation2 ({ self, pkgsOnHost, ... }: …) 00:23:42
@emilazy:matrix.orgemily I really want the targetPlatform = null stuff from https://github.com/NixOS/nixpkgs/issues/227327 to make specifying explicit cross package sets saner. feel like # do we care that it's pkgsBuildHost? is hinting at that confusion :) 00:24:47
@emilazy:matrix.orgemily for 99.9% of packages, pkgsBuildHost = pkgsBuildBuild = pkgsBuildTarget 00:24:59
@emilazy:matrix.orgemilyforcing people to specify just makes everything far more confusing :/00:25:09
@emilazy:matrix.orgemilyhowever that would be some additional lower-level work to make happen I think00:25:17
@tomasajt:matrix.orgTomaI think some extra package-sets need to be added with null targets, no?00:25:45
@emilazy:matrix.orgemily right (unless we can get away with just hacks to pass them stdenvs with the target stubbed out) and probably a lot of assumptions need correcting for that. 00:26:26
@emilazy:matrix.orgemily (free name bikeshed colour: mkPackage) 00:26:44

Show newer messages


Back to Room ListRoom Version: 9