| 8 Mar 2024 |
Minijackson | I think it'd be a really nice improvements in my own projects | 18:20:34 |
infinisil | Minijackson: You can fairly easily use the basic pattern. The tricky bit is ensuring it's correct, though even that can be implemented fairly easily just in Nix. Nixpkgs has unique constraints that make it much trickier to do that | 18:22:11 |
infinisil | Minijackson: This is the most basic thing you could use/copy: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/by-name-overlay.nix
The sharding doesn't make a lot of sense when you don't have a lot of packages, so I recommend just removing that for personal use
| 18:23:16 |
infinisil | Really at that point it's just a mapAttrs (name: _: callPackage (./ + "${name}") { }) (readDir ./.) | 18:23:56 |
infinisil | Fairly standard pattern already :) | 18:24:08 |
Minijackson | thanks a lot! | 18:24:27 |
| @julienmalka:matrix.org joined the room. | 18:39:37 |
| @janik0:matrix.org joined the room. | 18:55:10 |
| jakegrin joined the room. | 19:30:57 |
| rick.special joined the room. | 19:31:35 |
| @me:indeednotjames.com joined the room. | 19:40:34 |
@jade_:matrix.org | I just filed: https://github.com/NixOS/nixpkgs/pull/294353
In writing this I realized that we have both makeExtensible and makeScope. Is there any reason to use makeScope over makeExtensible? Have we written down somewhere secret which one to use in which cases? | 20:46:54 |
@jade_:matrix.org | Related question: in things like the nix packaging, what is the best practice for exposing internals like the boehmgc-nix package while avoiding unnecessarily confusing users with bonus attributes they probably don't care about? https://github.com/nixos/nixpkgs/blob/9080c3655bf8094f99c8c7cb548fd0ee75928260/pkgs/tools/package-management/nix/default.nix#L17-L162 | 20:49:33 |