# Pkgs/by-name for the masses

**URL:** https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858
**Category:** Announcements
**Created:** [January 6, 2024, 2:45am UTC](https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858 "2024-01-06T02:45:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mightyiam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mightyiam/32/33998_2.png) [@mightyiam](https://discourse.nixos.org/u/mightyiam)
#### Post date: [January 6, 2024, 2:45am UTC](https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858/1 "2024-01-06T02:45:16Z")

</div>

A trivial pkgs/by-name implementation flake without dependencies.

> **[GitHub - mightyiam/by-name: Trivial, Nixpkgs-inspired pkgs/by-name...](https://github.com/mightyiam/by-name)**
>
> Trivial, Nixpkgs-inspired pkgs/by-name implementation - GitHub - mightyiam/by-name: Trivial, Nixpkgs-inspired pkgs/by-name implementation

Thanks to @Infinisil, the champion of pkgs/by-name in Nixpkgs.

---

<div class="post-metadata">

### Author: ![GTrunSec](https://discourse.nixos.org/user_avatar/discourse.nixos.org/gtrunsec/32/2956_2.png) [@GTrunSec](https://discourse.nixos.org/u/GTrunSec)
#### Post date: [January 6, 2024, 7:21am UTC](https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858/2 "2024-01-06T07:21:08Z")

</div>

You might be interested in a more powerful packages [loader](https://github.com/GTrunSec/omnibus/blob/main/docs/org/pops-packages.org#example) implemented based on [haumea](https://github.com/nix-community/haumea/tree/main), which incorporates makeScope. It can easily export different layouts, such as `by-name`, flattenTreeDerivations, and overlays.

- [Packages Loader Doc](https://github.com/GTrunSec/omnibus/blob/main/docs/org/pops-packages.org#example)
- [Test dir](https://github.com/GTrunSec/omnibus-examples/tree/4be5c8611710702e199684cfc01b07c82759c804/packages)

---

<div class="post-metadata">

### Author: ![drupol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/drupol/32/9471_2.png) [@drupol](https://discourse.nixos.org/u/drupol)
#### Post date: [August 19, 2024, 3:03pm UTC](https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858/3 "2024-08-19T15:03:16Z")

</div>

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](https://github.com/drupol/nixos-x260/blob/f1bc5911b082fd48b7d627dcb962909f6a716efb/imports/pkgs.nix)

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 ?

---

<div class="post-metadata">

### Author: ![mightyiam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mightyiam/32/33998_2.png) [@mightyiam](https://discourse.nixos.org/u/mightyiam)
#### Post date: [August 19, 2024, 10:56pm UTC](https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858/4 "2024-08-19T22:56:30Z")

</div>

I just deprecated by-name in favor of `lib.filesystem.packagesFromDirectoryRecursive`.

---

<div class="post-metadata">

### Author: ![drupol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/drupol/32/9471_2.png) [@drupol](https://discourse.nixos.org/u/drupol)
#### Post date: [September 19, 2024, 9:38pm UTC](https://discourse.nixos.org/t/pkgs-by-name-for-the-masses/37858/5 "2024-09-19T21:38:07Z")

</div>

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.](https://github.com/drupol/pkgs-by-name-for-flake-parts)
