Best way to simultaneously use the NUR for installation and solve problems with packages/deps along the way?

I just started using nixpkg on a Manjaro install (nixnoob here), and wanted to install instantWM and dependecies (i.e. the instantnix meta package) as a nice use case, because it’s in constant flux and I’m also contributing to it, and nix appears an ideal solution when the “daily driver” is at the same time the “test platform”.

So, what happend:

$ nix-env -i nur.repos.instantos.instantnix
hash mismatch in fixed-output derivation '/nix/store/':
  wanted: sha256:1s4gzhmxvzrqbpvkr0j1cmr71is2iy13mklvh3yxq6gnk52ph822
  got:    sha256:1d9fzngdac99rc36g5flif3xzgrbl0k7b69dy9dzp8qf886z880b

For my normal nixpkgs clone (I use it for contributing PRs), I’d just go to the expression, change the sha and submit a PR.

But from my (naive) analysis, in this case, I’d have to

  • fork,
  • make the fix,
  • put in a PR,
  • wait until it’s merged
  • install

So the questions become:

  1. can I “directly” override the sha somewhere on my local system, to at least get further in building everything so I could later solve any issues in one go? (I noticed repos.json.lock, is there something similar I can use locally, and how to inform nix-env about it?)
  2. what is the “best practice”, i.e. most efficient way to transparently handle the NUR + any fixes I’d want to make?

The main purpose of (2) is being to be able to pull in a NUR package with many deps, and override a few specific packages of the deps with local clones or forks on github transparently, e.g. with a file in my ~/.config/nixpkgs/ dir specifying a list of such packages.

You should be able to use repoOverrides to use a local clone of a NUR, with your changes applied. That’s what I do with my NUR so that I can validate changes to my NUR before I publish them.