-
-
Save LnL7/137a46fb81d03aeeeec96017f7a58fc1 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
with import <nixpkgs/lib>; | |
let | |
generic = makeOverridable | |
({ name, value, ... }: { inherit name value; }); | |
darwin = let x = 42; in | |
generic { name = "darwin"; value = if false then 0 else x; }; | |
cross = | |
darwin.override { name = "cross"; }; | |
in | |
cross.value == 42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment