Skip to content

Instantly share code, notes, and snippets.

@exarkun
Created September 26, 2019 18:45
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/60dbbf6186ae3da328ec1441999bec63 to your computer and use it in GitHub Desktop.
Save exarkun/60dbbf6186ae3da328ec1441999bec63 to your computer and use it in GitHub Desktop.
let
overlayA = self: super: {
python27 = super.python27.override {
packageOverrides = python-self: python-super: {
foo = python-super.twisted;
};
};
};
packageOverridesB = python-self: python-super: {
bar = python-super.foo;
};
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.bar == python27.pkgs.twisted; 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment