| 14 Mar 2024 |
Philip Taron (UTC-8) | In reply to @philiptaron:matrix.org On lib.or: as far as I can tell, it's used in three files (lib/options.nix, pkgs/build-support/writers/data.nix, and pkgs/build-support/writers/scripts.nix) and for the uses in writers it could be trivially replaced with ||. https://github.com/NixOS/nixpkgs/pull/295982 | 21:14:29 |
| 15 Mar 2024 |
| @quantenzitrone:matrix.org changed their display name from quazi [ˈkvaːzi] to Zitrone. | 12:05:44 |
ryantm | infinisil: I'm running into an issue where I want to add new top-level attributes for my mmdoc rendering of the nixpkgs manual, and it depends on nixpkgs/doc folder, so when I put it in pkgs/by-name/ it complains about me using ../../ etc to reference the doc folder, and if I don't use by-name it also complains. Is there a way to skip the by-name checks one way or the other? Maybe I could fake inherit something in all-packages.nix to trick it, but that seems dirty. | 19:22:53 |
ryantm | Moving the whole doc folder into pkgs/by-name feels wrong too :devil: | 19:23:46 |
infinisil | ryantm: Ah that's an interesting case.. | 19:23:50 |
infinisil | 🤔 | 19:23:53 |
infinisil | ryantm: I'd say, don't put it in all-packages.nix, how about doc/default.nix instead, then optionally alias it from all-packages.nix | 19:24:40 |
ryantm | I'd like to make it be a normal nixpkgs pkg. | 21:32:46 |
ryantm | I've committed terrible crimes and got it to pass checks https://github.com/NixOS/nixpkgs/pull/108063/files#diff-ab5748dc9567516fefba8344056b51ec1866adeace380f46e58a7af3d619ea22R40196 | 21:44:59 |
ryantm | infinisil: What does "alias it from all-packages.nix" mean? | 22:59:01 |
infinisil | ryantm: Hmm so nixpkgs is a mess. I was hoping that the doc/default.nix attributes were somehow accessible in the top-level attribute set, but they're not | 23:09:21 |
infinisil | Some restructuring might be in order to make that a possibility | 23:09:33 |
infinisil | At least currently the manual can be built using nix-build doc or nix-build pkgs/top-level/release.nix -A manual | 23:10:30 |
infinisil | (and probably some other ways) | 23:10:37 |
ryantm | I kind of think it would be good to add some magic comments that bypass nix by-path checks. If these magic comments are unique enough, we can grep for them later. | 23:10:50 |
ryantm | Maybe I can trick them by doing something like thing = callPackage ./path/to/package/ { inherit stdenvNoCC;} | 23:12:01 |
infinisil | Wouldn't work, it's too smart for that :P | 23:12:54 |
infinisil | ryantm: How about not making it a top-level package? I can see nix-build -A nixpkgsManual.<something> | 23:13:40 |
ryantm | That's a good idea. | 23:14:15 |
infinisil | You can cheat the check by doing inherit ({ foo = callPackage ...; }) foo;, but that's not meant for this kind of thing | 23:14:18 |
infinisil | ryantm: Why do you need it to be exposed via the top-level attributes anyways? | 23:15:32 |
ryantm | infinisil: I just though it'd be nice to run nix run .#nixpkgs-manual-mmdoc-watch probably not required. | 23:16:55 |
infinisil | ryantm: I feel like exposing a separate attribute in flake.nix would be better | 23:18:30 |
infinisil | ryantm: Like, define it in doc/default.nix primarily, but then do nixpkgsManual = import ./doc or so in flake.nix | 23:19:04 |
infinisil | (also camelCase is the convention in Nixpkgs, not snake_case) | 23:19:52 |
infinisil | But I also get the argument for wanting the same interface between flakes and non-flakes, which wouldn't work with this.. | 23:21:55 |
infinisil | * But I also get the argument o wanting the same interface between flakes and non-flakes, which wouldn't work with this.. | 23:22:01 |
infinisil | * But I also get the argument of wanting the same interface between flakes and non-flakes, which wouldn't work with this.. | 23:22:04 |
infinisil | Nixpkgs is due for a refactoring and API change to make sure we have a single entry-point that exposes everything.. | 23:22:58 |
| 16 Mar 2024 |
| @grahamc:nixos.org joined the room. | 00:04:38 |