# Builtins.path hash change?

**URL:** https://discourse.nixos.org/t/builtins-path-hash-change/39364
**Category:** Nix
**Created:** [February 6, 2024, 1:17am UTC](https://discourse.nixos.org/t/builtins-path-hash-change/39364 "2024-02-06T01:17:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![elaforge](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elaforge/32/4289_2.png) [@elaforge](https://discourse.nixos.org/u/elaforge)
#### Post date: [February 6, 2024, 1:17am UTC](https://discourse.nixos.org/t/builtins-path-hash-change/39364/1 "2024-02-06T01:17:54Z")

</div>

Let me know if this is the wrong channel, would Help be more appropriate?

It seems like between nix 2.10 and 2.19, the hash of the path created by `builtins.path` has changed, but only if `path=` the output of an ordinary drv. E.g.:

```auto
builtins.path {
  name = "name";
  path = "/nix/store/bcwyhqvik6jhcklib33v6kykdl4zp9d4-bash-5.1-p8/bin/bash";
}

```

On 2.10.3 I get `/nix/store/59khc904ibx2wbb0nl8yx8cacwi2jkq4-name`, on 2.19.3 I get `/nix/store/nj8cpsr0hz8pfl45y2jg4mzyk48h17cw-name`. It doesn’t seem to happen for non-store paths, and doesn’t seem to happen for paths created via `./file` refs (inherently trusted? I forget what the internal name is for those), it seems to be specific to ordinary IA drv outputs.

Is this known and expected? If so, I won’t bother to find out where exactly it happened. I didn’t see anything in release notes about hash changes, but I don’t know if there’s any obligation to document them. I’m sure devs try to avoid them but maybe `builtins.path` is considered a dangerous internal function to use at your own risk?

It’s not a serious problem, just a bit alarming because it makes me worry what else has changed about hashes.

---

<div class="post-metadata">

### Author: ![fricklerhandwerk](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fricklerhandwerk/32/2029_2.png) [@fricklerhandwerk](https://discourse.nixos.org/u/fricklerhandwerk)
#### Post date: [February 6, 2024, 4:08am UTC](https://discourse.nixos.org/t/builtins-path-hash-change/39364/2 "2024-02-06T04:08:42Z")

</div>

This looks pretty much like a regression. Store paths should not change. Please check the issue tracker whether this was filled already, and file it if not.

---

<div class="post-metadata">

### Author: ![elaforge](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elaforge/32/4289_2.png) [@elaforge](https://discourse.nixos.org/u/elaforge)
#### Post date: [February 6, 2024, 7:11pm UTC](https://discourse.nixos.org/t/builtins-path-hash-change/39364/3 "2024-02-06T19:11:13Z")

</div>

Ok, filed an issue at [builtins.path hash changed on IA drv output, between 2.18 and 2.19 · Issue #9946 · NixOS/nix · GitHub](https://github.com/NixOS/nix/issues/9946)

I was able to try versions up to 2.18, but 2.19 and 2.20 are not in our nixpkgs latest snapshot. We are testing a locally compiled 2.19, but it’s directly from 91e60868bd1499cdf66d6a5e4edec380b1a5719f so the only difference would be 3rd party library versions, which shouldn’t affect hashes.
