Skip to content

Instantly share code, notes, and snippets.

@LnL7
Last active March 3, 2020 18:01
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 LnL7/137a46fb81d03aeeeec96017f7a58fc1 to your computer and use it in GitHub Desktop.
Save LnL7/137a46fb81d03aeeeec96017f7a58fc1 to your computer and use it in GitHub Desktop.
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