Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setFunctionArgs lib function. #34466

Merged
merged 1 commit into from Feb 2, 2018
Merged

Conversation

shlevy
Copy link
Member

@shlevy shlevy commented Jan 31, 2018

Among other things, this will allow *2nix tools to output plain data
while still being composable with the traditional
callPackage/.override interfaces.

Among other things, this will allow *2nix tools to output plain data
while still being composable with the traditional
callPackage/.override interfaces.
@shlevy
Copy link
Member Author

shlevy commented Jan 31, 2018

Interesting bits are in trivial.nix

@grahamc
Copy link
Member

grahamc commented Jan 31, 2018

I introduced a failure in the evaluator today, sorry about that. Testing for a fix:

@GrahamcOfBorg eval

@Ericson2314
Copy link
Member

This looks correct and whatnot, but I'm not sure I care about cabal2nix making plain data enough to warrant the extra complexity? I rather get rid of callPackage and its eta-expansion-hostile ways.

@shlevy
Copy link
Member Author

shlevy commented Feb 1, 2018

I'd also like to use it for my soon-to-be-public setupcfg2nix. It's silly to produce a function from plain data, and we're not getting rid of callPackage any time soon as far as I know...

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setFunctionArgs looks nice. I don't think that I'd use it in the Haskell infrastructure, though. Having access to plain data for those packages can be useful, but you can do that today already AFAIK.

I like the notion of simplifying access to plain data of those builds, but then I'd rather continue to explore NixOS/rfcs#3, which goes much farther than this approach.

@shlevy shlevy merged commit 943592f into NixOS:master Feb 2, 2018
@shlevy shlevy deleted the dynamic-function-args branch February 2, 2018 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants