# How to get a missing .drv file for a derivation from nixpkgs?

**URL:** https://discourse.nixos.org/t/how-to-get-a-missing-drv-file-for-a-derivation-from-nixpkgs/2300
**Category:** Help
**Created:** [March 4, 2019, 2:41am UTC](https://discourse.nixos.org/t/how-to-get-a-missing-drv-file-for-a-derivation-from-nixpkgs/2300 "2019-03-04T02:41:27Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![danbst](https://discourse.nixos.org/user_avatar/discourse.nixos.org/danbst/32/83_2.png) [@danbst](https://discourse.nixos.org/u/danbst)
#### Post date: [March 7, 2019, 1:35pm UTC](https://discourse.nixos.org/t/how-to-get-a-missing-drv-file-for-a-derivation-from-nixpkgs/2300/12 "2019-03-07T13:35:09Z")

</div>

Hydra says, that `/nix/store/53wi068kjrqfr2j0hzcxhbw2xaa990jr-bash-4.4-p23` was

> Cached from: [nixpkgs](https://hydra.nixos.org/project/nixpkgs):[cross-staging](https://hydra.nixos.org/jobset/nixpkgs/cross-staging):[avr.libcCross.x86\_64-linux](https://hydra.nixos.org/job/nixpkgs/cross-staging/avr.libcCross.x86_64-linux) [build 88317396](https://hydra.nixos.org/build/88317396)

Looking into [that build → Build Steps → Bash build details](https://hydra.nixos.org/build/88317396/nixlog/50) we see:

> Below is the build log of derivation /nix/store/2amas84m6w99q8lazd9fww6zrkakv6f9-bash-4.4-p23.drv. It was built on root@hydra.ewi.tudelft.nl.

However, on original Details page we see:

> Derivation store path: /nix/store/zvy7mbpxqlplqpflqn5xk9szx25s4mhg-bash-4.4-p23.drv

How I understand it: hydra instantiates derivation, computes it’s store-path, finds it in some previous build, reuses that binary cache together with old .drv information. When you fetch NAR, you fetch also old .drv information…

So, --deriver is pretty much flaky. I don’t know why `nix-store --realise` doesn’t see it. Probably Hydra has some cleanup script, which makes 1-to-1 mappings between store output and derivation?

---

_[View the full topic](https://discourse.nixos.org/t/how-to-get-a-missing-drv-file-for-a-derivation-from-nixpkgs/2300)._
