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

Fix: Use mkDerivation with src instead of runCommand for test derivation #357

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

Kranzes
Copy link
Member

@Kranzes Kranzes commented Aug 3, 2024

The problem with using runCommand and recreating the src directory with
lndir is that it changes the file types of individual files, they will
now be a symlink instead of a regular file. If you have a crate that tests
that a file is of regular type then it will fail inside the crate2nix derivation.

The problem with using runCommand and recreating the src directory with
lndir is that it changes the file types of individual files, they will
now be a symlink instead of a regular file. If you have a crate that tests
that a file is of regular type then it will fail inside the crate2nix derivation.
@Kranzes Kranzes requested a review from kolloch August 3, 2024 23:51
@apoelstra
Copy link
Contributor

As a user with a ton of disk space I would prefer this (many of my uses of crate2nix involve nasty hacks to un-symlink files so that I can either modify them or just pass "file exists and is -f checks".

But this will use more disk space and slow things down, possibly by a lot on large repos.

@Kranzes
Copy link
Member Author

Kranzes commented Aug 4, 2024

I think people should filter their src's properly with something like lib.fileset. They shouldn't be copying over the entire repo to the nix store. It's not that bad IMO.

@Kranzes Kranzes merged commit 236f6ad into master Aug 10, 2024
4 checks passed
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