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

RFC: Add buildExternalNixExpression #4657

Closed

Conversation

bjornfor
Copy link
Contributor

My attempt at answering/solving the "upstream nix expressions" question in http://lists.science.uu.nl/pipermail/nix-dev/2014-October/014734.html.

Please have a look and give some feedback :-)


This function is for building (external) packages that contain a
default.nix file in their sources.

Example usage:

  project-name = buildExternalNixExpression {
    src = fetchurl { ... };
  };

@bjornfor bjornfor force-pushed the build-external-nix-expression branch from 3a86ee4 to 2f91bce Compare October 24, 2014 19:38
This function is for building (external) packages that contain a
default.nix file in their sources.

Example usage:

  project-name = buildExternalNixExpression {
    src = fetchurl { ... };
  };
@bjornfor bjornfor force-pushed the build-external-nix-expression branch from 2f91bce to e3ee56e Compare October 24, 2014 19:48
@shlevy
Copy link
Member

shlevy commented Oct 24, 2014

This requires an import from a derivation, which means:

a) readonly queries will fail
b) you have to build all packages needed to run e.g. fetchurl to instantiate the derivation.

@vcunat
Copy link
Member

vcunat commented Oct 25, 2014

@shlevy: these are inherent to the problem at hand, not to this implementation, right?

@shlevy
Copy link
Member

shlevy commented Oct 25, 2014

@vcunat Alternative solution without that problem is recursive nix (NixOS/nix#13)

@vcunat
Copy link
Member

vcunat commented Oct 25, 2014

Ah, I can see now how this is side-stepped. I forgot how the #13 issue was meant.

@@ -261,6 +261,8 @@ let
inherit (pkgs) runCommand perl;
};

buildExternalNixExpression = callPackage ../build-support/build-external-nix-expression/default.nix { };
Copy link
Member

Choose a reason for hiding this comment

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

This is not a package so you shouldn't use callPackage here.

@bjornfor
Copy link
Contributor Author

Thanks for the feedback. Closing this then, and hoping for NixOS/nix#13 to be solved/implemented :-)

@bjornfor bjornfor closed this Oct 30, 2014
@nbp nbp mentioned this pull request Feb 26, 2017
4 tasks
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.

5 participants