Skip to content

Allow using RegisterPrimop to define constants.#1855

Merged
edolstra merged 2 commits intoNixOS:masterfrom
shlevy:register-constant
Feb 13, 2018
Merged

Allow using RegisterPrimop to define constants.#1855
edolstra merged 2 commits intoNixOS:masterfrom
shlevy:register-constant

Conversation

@shlevy
Copy link
Member

@shlevy shlevy commented Feb 8, 2018

On top of #1854, this enables plugins to declare constants as well as primops. In particular, this allows a plugin to implement #1844 without requiring a dummy variable to the primop.

(Only the last commit here is novel, this is based on #1854)

All plugins in plugin-files will be dlopened, allowing them to
statically construct instances of the various Register* types Nix
supports.
@shlevy shlevy requested a review from edolstra February 8, 2018 18:03
@shlevy shlevy force-pushed the register-constant branch from 41601ba to 18ac8d4 Compare February 8, 2018 18:31
@shlevy shlevy changed the title Add RegisterConstant so plugins can register constants. Allow using RegisterPrimop to define constants. Feb 8, 2018
This enables plugins to add new constants, as well as new primops.
@shlevy shlevy force-pushed the register-constant branch from 18ac8d4 to 081f14a Compare February 8, 2018 19:35
@edolstra edolstra merged commit 081f14a into NixOS:master Feb 13, 2018
@shlevy shlevy deleted the register-constant branch February 13, 2018 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants