-
-
Save adrianparvino/c8404b3c341ccbece3c175e85f1e3565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> { | |
overlays = [ | |
(final: prev: { | |
haskellPackages = prev.haskellPackages.extend (self: super: { | |
test-notexist-a = self.hello; | |
}); | |
}) | |
# PROBLEM: a second overlay adds test-notexist-b but causes the | |
# previously added test-notexist-a to disappear. | |
# SOLUTION: use the override style which gets the old override attrs (??) | |
# and then manually generate the overrides attrs (??) by calling | |
# old.overrides and then combine it with the new one | |
(final: prev: { | |
haskellPackages = prev.haskellPackages.extend (self: super: { | |
test-notexist-b = self.hello; | |
}); | |
}) | |
]; | |
}; | |
in | |
{ | |
hello = pkgs.haskellPackages.hello; | |
a = pkgs.haskellPackages.test-notexist-a; | |
b = pkgs.haskellPackages.test-notexist-b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment