Skip to content

implement packageOverrides argument#24

Open
charlieshanley wants to merge 1 commit into
svanderburg:masterfrom
charlieshanley:packageOverrides
Open

implement packageOverrides argument#24
charlieshanley wants to merge 1 commit into
svanderburg:masterfrom
charlieshanley:packageOverrides

Conversation

@charlieshanley
Copy link
Copy Markdown

This makes it so the generated nix expressions accept the argument packageOverrides, which allows users to override the derivations of dependencies.
This is desirable in the case that a dependency cannot be built with nix as-is -- my motivating case was a package that wanted to make network requests in post-install-cmd.

packageOverrides should be an attrset whose values are a function from the old derivation to a new one.

Here is an example:

packageOverrides = {
  "podlibre/ipcat" = oldPkg: applyPatches {
    src = oldPkg;
    patches = [(substituteAll {
      src = ./datacenters.patch;
      datacenters = "${ipcat}/datacenters.csv";
    })];
  };
};

@svanderburg
Copy link
Copy Markdown
Owner

Hi, I'm afraid due to my earlier changes this pull request is conflicting.

I think the overriding feature can be quite useful. Would it be possible for you to rebase your changes?

Furthermore, can you also write a small example that can be added to the README.md? Otherwise, it's a hidden feature and there's a chance this will bit rot because it can't be properly tested and maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants