# Nixpkgs has been the largest repository for months

**URL:** https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667
**Category:** Uncategorized
**Created:** [December 24, 2020, 4:09pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667 "2020-12-24T16:09:40Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Atemu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/atemu/32/10383_2.png) [@Atemu](https://discourse.nixos.org/u/Atemu)
#### Post date: [December 24, 2020, 4:09pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/1 "2020-12-24T16:09:40Z")

</div>

Turns out that a few thousand packages hidden in subsets were simply not included in the JSON file we export and Repology imports.

Now that [tarball: backport nixos-search's subsets for JSON generation by Atemu · Pull Request #105857 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/105857) is merged and the channel has advanced past it, nixpkgs-unstable has surpassed the AUR:

 ![image](https://discourse.nixos.org/uploads/default/original/2X/f/f9178580f036209fb65f4b0bbd9ae73b6385c65a.png)

> **[Repository statistics - Repology](https://repology.org/repositories/statistics/total)**
>
> Multiple package repositories analyzer

You all rock.

---

<div class="post-metadata">

### Author: ![Atemu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/atemu/32/10383_2.png) [@Atemu](https://discourse.nixos.org/u/Atemu)
#### Post date: [December 24, 2020, 4:14pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/2 "2020-12-24T16:14:54Z")

</div>

![image](https://discourse.nixos.org/uploads/default/original/2X/1/1f6a38cffbc0072e4c3392447e5a83176b3bc964.png)

> **[Graphs - Repology](https://repology.org/repositories/graphs)**
>
> Multiple package repositories analyzer

We are off the charts! 😉

---

<div class="post-metadata">

### Author: ![nixinator](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nixinator/32/3859_2.png) [@nixinator](https://discourse.nixos.org/u/nixinator)
#### Post date: [December 25, 2020, 4:55am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/3 "2020-12-25T04:55:55Z")

</div>

Strangely enough i made gourse simulation of the growth of nixpkgs. Near the end it it almost breaks my machine :-).

Check it out (with -recursive)

> **[GitHub - nixinator/nixpkgs-gourse: A visualization of the nixpkgs repo using...](https://github.com/nixinator/nixpkgs-gourse)**
>
> A visualization of the nixpkgs repo using gourse with a handy nix-shell and github avatars - GitHub - nixinator/nixpkgs-gourse: A visualization of the nixpkgs repo using gourse with a handy nix-she...

isn’t working on AMD based GFX cards right now due to some issue with nixos that i’m trying to get to the bottom of.

---

<div class="post-metadata">

### Author: ![Zimm\_i48](https://discourse.nixos.org/user_avatar/discourse.nixos.org/zimm_i48/32/815_2.png) [@Zimm\_i48](https://discourse.nixos.org/u/Zimm_i48)
#### Post date: [January 13, 2021, 9:01am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/4 "2021-01-13T09:01:51Z")

</div>

The Repology dataset is mostly made of “distribution-like” generalist package repositories, but it also includes a few application-specific package managers / repositories: CPAN / CRAN / [crates.io](http://crates.io) / Hackage / MELPA / PyPI / RubyGems. However, it doesn’t include the biggest player in the field: npm. According to [this blog post](https://blog.npmjs.org/post/615388323067854848/so-long-and-thanks-for-all-the-packages), the package count on npm is over 1.3 million. Also, some other repositories listed on Repology might show truncated numbers. [This page](https://rubygems.org/stats) claims that there are 164,202 Ruby gems but Repology only counts 3526. That being said, these numbers are not comparable because package authors upload directly to npm or RubyGems and use them as a primary distribution source. So the “work” is much more distributed and unmaintained packages are not generally removed. On the contrary, nixpkgs (like most “distribution-like” package repositories) is curated and maintained by volunteer maintainers that are mostly independent of package authors.

A good source of data on application-specific package managers is [https://libraries.io/](https://libraries.io/). According to their stats, there are 7 registries / repositories above 100K packages and 10 above the 59K bar set by nixpkgs unstable.

---

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [January 13, 2021, 4:00pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/5 "2021-01-13T16:00:08Z")

</div>

I don’t think it’s a goal of nixpkgs to compare ourselves against npm. I think it is insightful to compare ourselves to other distributions which have a high degree of package overlap. Nix is a truly unique way to approach software package management, and being able to gauge ourselves against other established repositories (even those which have funded dedicated teams) gives a good metric of our viability as a repository.

Also, including 1.3 million node packages, and 164k ruby gems would increase the size of the nixpkgs repo greatly. The nixpkgs repo is already at 206M unpacked in its current state.

---

<div class="post-metadata">

### Author: ![igel](https://discourse.nixos.org/user_avatar/discourse.nixos.org/igel/32/3964_2.png) [@igel](https://discourse.nixos.org/u/igel)
#### Post date: [January 14, 2021, 1:36pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/6 "2021-01-14T13:36:24Z")

</div>

statistics can give you always what you want.

you could take a closer look to quality (not quantity)  
count the broken packages as well:  
e.g. R  
`pkgs= import (fetchTarball https://github.com/nixos/nixpkgs/archive/nixos-20.09.tar.gz) {}`  
total:\_\_ 18476  
broken: 18472

* * *

on day two you could ask about semantics/variants/long term strategy?  
like `python38` vs `python38Full`

what about the sub ecosystems depending on nix/nixpkgs?

* * *

on day three you could ask about process assurance

- how many packages are getting create automatically // have to be manipulated by human effort

---

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [January 15, 2021, 1:56am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/7 "2021-01-15T01:56:09Z")

</div>

I’m not sure the point you’re trying to make. I’ll agree that some ecosystems in nixpkgs have less support, but nix is usually a solid foundation in which to build abstractions. And some of those abstractions (e.g. pythonXFull) have been around for a long time: Nixpkgs will be celebrating its 18th birthday in Mar 2021.

Scenarios that core contributors really care about (zfs, wayland, system configuration, reproducibility, etc.) probably has some of the best user experience across any linux distribution, while many less used technologies and tools may have poor to non-existent support in nixpkgs.

> [@igel](#):
>
> on day three you could ask about process assurance

For a package repository, we just need to package the software as close as upstream intended the software to be used. In discord, the majority of package issues that people have are from the upstream source, and not so much nixpkgs’ packaging. But maybe I have some perception bias in this regard.

---

<div class="post-metadata">

### Author: ![Infinisil](https://discourse.nixos.org/user_avatar/discourse.nixos.org/infinisil/32/26523_2.png) [@Infinisil](https://discourse.nixos.org/u/Infinisil)
#### Post date: [January 15, 2021, 11:07am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/8 "2021-01-15T11:07:26Z")

</div>

I think a more useful metric would be “What is the chance that a package a user wants to use is available and working in nixpkgs?”

This would take into account how popular a package is, since more users will want to use it. So a distro only packaging all 1.3 million node package wouldn’t have a higher score than most others.

---

<div class="post-metadata">

### Author: ![igel](https://discourse.nixos.org/user_avatar/discourse.nixos.org/igel/32/3964_2.png) [@igel](https://discourse.nixos.org/u/igel)
#### Post date: [January 15, 2021, 3:04pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/9 "2021-01-15T15:04:12Z")

</div>

I don’t want to MAKE a certain point  
 → it is more important to see a total picture than a stats figure  
think yourself what your needs are and what a adequate solution could be 🙂

---

<div class="post-metadata">

### Author: ![Ekleog](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ekleog/32/50_2.png) [@Ekleog](https://discourse.nixos.org/u/Ekleog)
#### Post date: [January 16, 2021, 4:41am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/10 "2021-01-16T04:41:34Z")

</div>

Out of curiosity, I’ve just taken the top 5000 packages of “Statistics by source packages (max)” sorted by “inst” from [https://popcon.debian.org/](https://popcon.debian.org/) ; and grepped the nixpkgs source code for these package names. I then eliminated packages that contained `python` or `node`, as we probably have them and the name would never match. This is quite obviously a bad evaluation (eg. just in the first page of the csv `slang2` is not found as “in nixpkgs” because nixpkgs calls it `slang`), but whatever, it may still be interesting to have a look at.

It left me with 4518 packages, of which 1748 are not in nixpkgs. Obviously there are still a lot of false positives (eg. ripgrep is rust-ripgrep for debian…), and I’m not totally sure what this list precisely is about, but I feel like it gives an overall idea: we probably have around 500-1500 packages missing to have the debian-popcon top 5000.

Note that this comparison is quite dumb though, as popcon is voluntary, my testing is really really simple, I also count debian-specific packages like debconf, etc. But I think it does show that we still have a way to go to have all useful packages.

(FWIW, I’ve opened [Introduce some kind of popularity contest/popcon data for packages? · Issue #159 · repology/repology-webapp · GitHub](https://github.com/repology/repology-webapp/issues/159) to see whether repology might be interested in introducing something like that directly on there, as it has all the normalization logic already they probably could do much better than I could by blindly grepping through nixpkgs)

---

<div class="post-metadata">

### Author: ![7c6f434c](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/7/8e7dd6/32.png) [@7c6f434c](https://discourse.nixos.org/u/7c6f434c)
#### Post date: [January 16, 2021, 9:46am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/11 "2021-01-16T09:46:21Z")

</div>

> It left me with 4518 packages, of which 1748 are not in nixpkgs. Obviously there are still a lot of false positives (eg. ripgrep is rust-ripgrep for debian…), and I’m not totally sure what this list precisely is about, but I feel like it gives an overall idea: we probably have around 500-1500 packages missing to have the debian-popcon top 5000.

If anyone wants to try making sense of that list, I guess I would recommend for each missing package to see what executables it provides, look them up in nix-index, and report how many of the packages provide executables that we do not have. I do not have it in me to do this right now, though. If someone wants to go fancy, they could find out what are the top source packages ordered by the popularity of the most popular corresponding binary package that provide binary packages with binaries that we do not have.

I wonder how many packages are actually debian-specific configuration tools, but that is probably harder to check automatically.

---

<div class="post-metadata">

### Author: ![Thra11](https://discourse.nixos.org/user_avatar/discourse.nixos.org/thra11/32/2384_2.png) [@Thra11](https://discourse.nixos.org/u/Thra11)
#### Post date: [January 16, 2021, 6:58pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/12 "2021-01-16T18:58:47Z")

</div>

I think the AUR is at a slight disadvantage here in that it isn’t meant to be a complete repository containing every package, but to complement Arch Linux’s main repository with additional packages which aren’t in the main repository. While there is some overlap where e.g. the AUR has a different version or flavour of a package which exists in the main repository, it would probably make more sense to consider Arch + AUR together, in that that represents the total range of packages available to an Arch Linux user. If we do a quick and dirty calculation ignoring any overlap, that would give 58222 + 9370 = 67592 total packages packaged for Arch Linux, which is quite a bit more than nixpkgs unstables’ 58617 packages.

(That wasn’t meant to be a reply to @Ekleog, but now I can’t seem to change it and if I delete it and try to re post it as reply to the thread it complains that the body is too similar to what was recently posted 😒)

---

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [January 17, 2021, 12:14am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/13 "2021-01-17T00:14:49Z")

</div>

Also remember that the AUR is inflated with “variants”. Most of the really popular packages will have a `<pkgs>-<svc tag>` variant (e.g. `ripgrep-git`). When comparing different repositories, I think the non-unique value is a better reflection of its package availability (as a package with that same name needs to appear in at least one other repository). And the same applies with nixpkgs. This would be 48154 for nixpkgs unstable, and (27117 + 8788) = 35905 for Arch+AUR.

Not to mention that the NUR is also not calculated in this, it may be an order of magnitude or two less popular than AUR; but there are still a significant number of packages in it.

---

<div class="post-metadata">

### Author: ![Atemu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/atemu/32/10383_2.png) [@Atemu](https://discourse.nixos.org/u/Atemu)
#### Post date: [January 17, 2021, 7:27pm UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/14 "2021-01-17T19:27:58Z")

</div>

Repology accounts for such variants in their ‘Projects’ metric.

---

<div class="post-metadata">

### Author: ![davidak](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davidak/32/49_2.png) [@davidak](https://discourse.nixos.org/u/davidak)
#### Post date: [February 18, 2021, 6:26am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/15 "2021-02-18T06:26:02Z")

</div>

[https://github.com/NixOS/nixpkgs/issues/110348](https://github.com/NixOS/nixpkgs/issues/110348)

---

<div class="post-metadata">

### Author: ![davidak](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davidak/32/49_2.png) [@davidak](https://discourse.nixos.org/u/davidak)
#### Post date: [August 22, 2021, 8:45am UTC](https://discourse.nixos.org/t/nixpkgs-has-been-the-largest-repository-for-months/10667/16 "2021-08-22T08:45:00Z")

</div>

We are back on top after the emacs issue was resolved.

![Screenshot from 2021-08-22 10-40-48](https://discourse.nixos.org/uploads/default/original/2X/1/11a314f37b462598ae434d930caf626f7f3bfc87.png)

Source: [Repository statistics - Repology](https://repology.org/repositories/statistics/total)
