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

download all derivations via one nix build call #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavHau
Copy link

@DavHau DavHau commented Oct 23, 2022

No description provided.

lines = b.filter (x: x != [] && x != "") (b.split "\n" text);

# load a .drv file so that the evaluator accepts it as derivation
loadDrv = drvFile:

Choose a reason for hiding this comment

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

I believe builtins.import drvFile should just as well for your purposes and is less hacky.

Copy link
Member

Choose a reason for hiding this comment

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

@sternenseemann I've wanted to do marsnix again but implement it in pure Nix using RFC92.

Copy link

Choose a reason for hiding this comment

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

@DavHau may have written it this way to work around a bug in cppnix.

I believe builtins.import drvFile should just as well for your purposes and is less hacky.

It probably should. However when I tried replacing loadDrv with builtins.import I managed to crash nix-daemon!

2023-11-21_00:25:38.46594 nix-daemon: src/libstore/derivations.cc:730: static std::string_view nix::BasicDerivation::nameFromPath(const nix::StorePath&): Assertion `hasSuffix(nameWithSuffix, extension)' failed.

Note that the assertion is occurring in nix-daemon, not nix-build; eval succeeds.

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.

3 participants