!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

215 Members
69 Servers

Load older messages


SenderMessageTime
6 Jan 2025
@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
@tomasajt:matrix.orgToma now that I think about it, self, (which I think means finalAttrs.finalPackage) contains everything that finalAttrs does so in theory we could just skip giving access to finalAttrs, but it might make it more confusing 00:27:21
@emilazy:matrix.orgemily (though actually I'd be somewhat tempted to make it a new by-name interface – like package2.nix is just the { self, pkgsOnHost, ... }: … part and the mkPackage is implicit) 00:27:43
@emilazy:matrix.orgemily (that way you eliminate the extra layer of { lib, mkDerivation2 }: and never make the terrible mistake of getting a spliced package from that level) 00:28:00
@emilazy:matrix.orgemily I was actually thinking of it just as a less verbose name for finalAttrs, but that might work too :) 00:28:20
@tomasajt:matrix.orgTomayeah maybe, though we always have to make sure non nixpkgs users can healthily consume single file package definitions00:29:08
@emilazy:matrix.orgemily (I was really happy when I thought of this because it's an excuse to use inherit rather than with with explicit package sets that also happens to solve a major overrides pain point) 00:29:23
@emilazy:matrix.orgemily (it happens quite a lot that you pick some specific package variant in your dependencies header and that causes override issues, being able to define the interface locally is really nice since all-packages.nix action at a distance sucks and gets in the way of by-name) 00:29:56
@tomasajt:matrix.orgToma* yeah maybe, though we always have to make sure non-nixpkgs consumers of mkDerivation2 can healthily use it00:30:03
@emilazy:matrix.orgemily callPackage2 :p 00:30:09
@tomasajt:matrix.orgTomaheh00:30:14
@emilazy:matrix.orgemily I mean mkDerivation2 is basically doing the job of callPackage 00:30:36
@tomasajt:matrix.orgTomaanyways I really have to go to sleep now, I messed up my schedule implementing this, bye!!00:30:40
@emilazy:matrix.orgemilysince it is also handling overrides00:30:40

Show newer messages


Back to Room ListRoom Version: 9