Closed infinisil closed 2 years ago
This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/tweag-nix-dev-update-26/18252/1
Thank you for the updates you provided. I'll try to get through them some afternoon this week.
Besides the override interface this looks fine and I'd accept it. @infinisil can you make that change?
@andir Changed the interface according to your suggestion.
While I think there's some redundancy to it (because it's probably always going to be a .overrideAttrs
, and the old
argument isn't really needed), I think the benefit of familiarity is beneficial enough. Also the implementation becomes a bit nicer.
(ping, does this look good?)
Adds support for patching dependency sources with
patches
andpostPatch
derivation attributes. This is a bit hacky, as patching any files requires recalculating theintegrity
value, which needs to be done at build-time. But it works, and I made sure to make the code resilient and commented.This is a solution for https://github.com/nix-community/npmlock2nix/issues/110, as this allows doing
patchShebangs
on individual packages.npmlock2nix
could also provide a predefined list of patches for individual packages for convenience in the future.