# Nix 2.5.0 released

**URL:** https://discourse.nixos.org/t/nix-2-5-0-released/16589
**Category:** Nix Releases
**Created:** [December 13, 2021, 10:44pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589 "2021-12-13T22:44:13Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![edolstra](https://discourse.nixos.org/user_avatar/discourse.nixos.org/edolstra/32/84_2.png) [@edolstra](https://discourse.nixos.org/u/edolstra)
#### Post date: [December 13, 2021, 10:44pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/1 "2021-12-13T22:44:13Z")

</div>

Hi,

I’m pleased to announce the availability of Nix 2.5.0. It is available from [Download Nix / NixOS | Nix & NixOS](https://nixos.org/download.html).

Here are the release notes:

- The garbage collector no longer blocks new builds, so the message `waiting for the big garbage collector lock...` is a thing of the past.

- Binary cache stores now have a setting `compression-level`.

- `nix develop` now has a flag `--unpack` to run `unpackPhase`.

- Lists can now be compared lexicographically using the `<` operator.

- New built-in function: `builtins.groupBy`, with the same functionality as Nixpkgs’ `lib.groupBy`, but faster.

- `nix repl` now has a `:log` command.

The [next release](https://github.com/NixOS/nix/milestone/14) is scheduled for 2022-01-24.

Thank you to all the contributors!

---

<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: [December 14, 2021, 12:31am UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/2 "2021-12-14T00:31:56Z")

</div>

Hi,

First, thank you for Nix 2.5!

Just, as I see a new built-in, I’m curious: is there any RFC that  
described this addition to the language? Given that the RFC repo readme  
explicitly mentions “Any semantic or syntactic change to the language  
that is not a bug fix” and “Introduction of new interfaces or functions”  
as requiring an RFC, I think a new built-in would fit the bill.

My thinking is that just dumping functions from lib into builtins to  
make them faster may be a good short-term solution to slowness, but may  
be a long-term hindrance by forcing nix to keep backwards-compatibility  
with that forever.

So I don’t want to debate this specific addition here, but do you know  
of any RFC or framework RFC that would clarify which functions should be  
made into built-ins and which ones should not? And if there is currently  
none, would it be possible to have one before the next addition of a  
built-in, in order to avoid built-in proliferation issues?

(cc @infinisil as you appear to have made the initial PR)

---

<div class="post-metadata">

### Author: ![edolstra](https://discourse.nixos.org/user_avatar/discourse.nixos.org/edolstra/32/84_2.png) [@edolstra](https://discourse.nixos.org/u/edolstra)
#### Post date: [December 14, 2021, 10:35am UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/3 "2021-12-14T10:35:01Z")

</div>

The RFC process is for “when one intends to make “substantial” changes to the Nix ecosystem”, which in my opinion doesn’t apply to adding utility functions like `groupBy` (and I don’t think we’ve ever had an RFC about adding a builtin function). Having said that, it would be good to have some written rule about when it is appropriate to add builtin functions.

---

<div class="post-metadata">

### Author: ![ryantm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ryantm/32/900_2.png) [@ryantm](https://discourse.nixos.org/u/ryantm)
#### Post date: [December 15, 2021, 1:04pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/4 "2021-12-15T13:04:26Z")

</div>



---

<div class="post-metadata">

### Author: ![pasqui23](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@pasqui23](https://discourse.nixos.org/u/pasqui23)
#### Post date: [December 15, 2021, 1:47pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/5 "2021-12-15T13:47:57Z")

</div>

@edolstra I’ve noticed that the most recent builtin fetchers are usually exposing functionality that was added for flakes, am I correct?

---

<div class="post-metadata">

### Author: ![edolstra](https://discourse.nixos.org/user_avatar/discourse.nixos.org/edolstra/32/84_2.png) [@edolstra](https://discourse.nixos.org/u/edolstra)
#### Post date: [December 15, 2021, 2:25pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/6 "2021-12-15T14:25:15Z")

</div>

Yes (if you mean `builtins.fetchTree`), but I think it requires the `flakes` experimental feature to be enabled.

---

<div class="post-metadata">

### Author: ![pasqui23](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@pasqui23](https://discourse.nixos.org/u/pasqui23)
#### Post date: [December 15, 2021, 2:27pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/7 "2021-12-15T14:27:49Z")

</div>

I’m also talking about fetchGit and friends

---

<div class="post-metadata">

### Author: ![lilyball](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lilyball/32/939_2.png) [@lilyball](https://discourse.nixos.org/u/lilyball)
#### Post date: [December 19, 2021, 1:34am UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/8 "2021-12-19T01:34:09Z")

</div>

Nixpkgs still has Nix 2.4. Why can’t I find a PR on nixpkgs for Nix 2.5?

---

<div class="post-metadata">

### Author: ![kubukoz](https://discourse.nixos.org/user_avatar/discourse.nixos.org/kubukoz/32/2854_2.png) [@kubukoz](https://discourse.nixos.org/u/kubukoz)
#### Post date: [December 20, 2021, 3:58pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/9 "2021-12-20T15:58:41Z")

</div>

There is one now: [nix: 2.4 -\> 2.5.1 by roberth · Pull Request #151419 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/151419)

---

<div class="post-metadata">

### Author: ![kubukoz](https://discourse.nixos.org/user_avatar/discourse.nixos.org/kubukoz/32/2854_2.png) [@kubukoz](https://discourse.nixos.org/u/kubukoz)
#### Post date: [December 21, 2021, 6:45pm UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/10 "2021-12-21T18:45:20Z")

</div>

Am I mistaken, but is /nix/store/trash a thing of the past as well? Is that what the “big lock” was?

---

<div class="post-metadata">

### Author: ![edolstra](https://discourse.nixos.org/user_avatar/discourse.nixos.org/edolstra/32/84_2.png) [@edolstra](https://discourse.nixos.org/u/edolstra)
#### Post date: [December 22, 2021, 10:18am UTC](https://discourse.nixos.org/t/nix-2-5-0-released/16589/11 "2021-12-22T10:18:58Z")

</div>

The `trash` directory existed to reduce the time window during which the garbage collector had to hold the global GC lock (since moving a big store path to `trash` is quick, while deleting it may be slow). Now that the collector is non-blocking, this is no longer necessary.
