Skip to content

Instantly share code, notes, and snippets.

@exarkun
Created September 26, 2019 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exarkun/fc1eba9cb43ad42ed438247dc19a44e0 to your computer and use it in GitHub Desktop.
Save exarkun/fc1eba9cb43ad42ed438247dc19a44e0 to your computer and use it in GitHub Desktop.
let
overlayA = self: super: {
python27 = super.python27.override {
packageOverrides = python-self: python-super: {
foo = "foo";
};
};
};
packageOverridesB = python-self: python-super: {
foo = python-super.foo + "bar";
};
overlayB = self: super: {
python27 = super.python27.override (old: {
packageOverrides = super.lib.composeExtensions old.packageOverrides packageOverridesB;
});
};
in
with import <nixpkgs> {
overlays = [
overlayA
overlayB
];
};
assert python27.pkgs.foo == "foobar"; 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment