| 6 Jan 2025 |
Artturin | https://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 maybe | 19:48:09 |
emily | I guess the per-platform bootstrap stages don't necessarily know whether cc is going to be set in the stdenv? 🤔 | 19:48:16 |
emily | 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 |
emily | but including the SDK in stdenvNoCC pulls in a bunch of stuff | 19:49:02 |
Randy Eckenrode | Did the old stdenvNoCC include CoreFoundation? | 19:53:05 |
Randy Eckenrode | It’s picking up extraBuildPackages? | 19:53:28 |
Randy Eckenrode | * It’s picking up extraBuildInputs? | 19:53:40 |
emily | https://github.com/NixOS/nixpkgs/issues/371465 | 19:54:30 |
Randy Eckenrode | I saw the issue. Was this not a problem no one noticed before because it was just the CoreFoundation headers and stubs? | 19:55:11 |
Randy Eckenrode | * | 19:55:41 |
Randy Eckenrode | The SDK pulls in a toolchain because it symlinks some stuff in $DEVELOPER_DIR/usr/bin because Chromium. | 19:57:06 |
Randy Eckenrode | Isn’t the easy fix to drop extraBuildInputs on Darwin? | 19:57:40 |
Randy Eckenrode | * Isn’t the easy fix to drop extraBuildInputs from stdenvNoCC on Darwin? | 19:57:56 |
emily | yes | 19:58:31 |
emily | I was trying to figure out how to do this | 19:58:34 |
emily | 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 |
Toma | Would 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 it | 00:19:15 |
emily | oh I will have a lot of opinions about this | 00:20:49 |
emily | fwiw there is also https://github.com/NixOS/nixpkgs/pull/296769 | 00:21:05 |
emily | my #1 request: do the depsInPath/deps thing, but make them attribute sets, and have overrides work by the name | 00:21:59 |
emily | e.g., deps = { inherit (pkgsOnHost) zlib ffmpeg; } but deps = { inherit (pkgsOnHost) zlib; ffmpeg = pkgsOnHost.ffmpeg_7; boost = pkgsOnHost.boost179; } | 00:22:35 |
emily | 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 |
emily | I'd also suggest not bundling the package sets under finalAttrs. just do something like e.g. mkDerivation2 ({ self, pkgsOnHost, ... }: …) | 00:23:42 |
emily | 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 |
emily | for 99.9% of packages, pkgsBuildHost = pkgsBuildBuild = pkgsBuildTarget | 00:24:59 |
emily | forcing people to specify just makes everything far more confusing :/ | 00:25:09 |
emily | however that would be some additional lower-level work to make happen I think | 00:25:17 |
Toma | I think some extra package-sets need to be added with null targets, no? | 00:25:45 |
emily | 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 |
emily | (free name bikeshed colour: mkPackage) | 00:26:44 |