There are some caveats to doing it like that though, and that is that this will import a totally different version of nixpkgs, with all kinds of outdated and duplicate libraries, while also doubly evaluating nixpkgs. This is slow, burns a ton of disk space and is a potential source of security issues in the future (when you inevitably forget about this, or never get around to unpinning this).
I think better practice is just to change the source version with overrideAttrs
, but that’s difficult in this case because the build script changed quite a bit: amule: unbreak (except daemon), unstable-20201006 -> 2.3.3, use cmake · NixOS/nixpkgs@1a8cf34 · GitHub
You could also just copy the old derivation, and callPackge
it by hand. I always wonder if there is a nice way to do that with nix when I run into this.
Maybe in this case the best practice is just to try and get the package updated in nixpkgs proper.