A trivial pkgs/by-name implementation flake without dependencies.
Thanks to @Infinisil, the champion of pkgs/by-name in Nixpkgs.
A trivial pkgs/by-name implementation flake without dependencies.
Thanks to @Infinisil, the champion of pkgs/by-name in Nixpkgs.
You might be interested in a more powerful packages loader implemented based on haumea, which incorporates makeScope. It can easily export different layouts, such as by-name
, flattenTreeDerivations, and overlays.
Hello,
I’m curious to understand what you are trying to do. Are you trying to load packages from a directory like in nixpkgs?
I’m also doing that in my own repo, but I don’t really need an external project for this, just reusing what’s already in nixpkgs. See it here : nixos-x260/imports/pkgs.nix at f1bc5911b082fd48b7d627dcb962909f6a716efb · drupol/nixos-x260 · GitHub
Please, feel free to explain what are the benefits of using your method or mine, I just want to understand. For example, why would I use haumea for this ?
I just deprecated by-name in favor of lib.filesystem.packagesFromDirectoryRecursive
.
I just released this module for flake.parts that do it for you now: GitHub - drupol/pkgs-by-name-for-flake-parts: A plugin for flake.parts framework.