lib/strings: Add makeIncludePath#296237
Conversation
|
Result of 1 package blacklisted:
|
|
i think |
the ffi gem seems to manage headers and libs loading itself |
|
parsing C headers is fairly common for ffi in dynamic languages. |
lolbinarycat
left a comment
There was a problem hiding this comment.
seems like a trivial function with adequate usecases, i don't see a reason to oppose this.
there are a few tweaks to the documentation i would suggest, however.
Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com>
Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com>
There was a problem hiding this comment.
It looks good to me, but it's unfortunate that all makeSearchPath functions are entirely untested, and I'd rather not merge new untested code (also in the new lib contribution guidelines).
So could you write some tests for these functions? lib/tests/misc.nix should work here
I add it soon as possible, i didn't know where to put the tests ^^ |
I add unit test for strings but i don't know how to test with pkgs arguments |
|
maybe you could add |
I made requested changes. Would you like me to test makeLibraryPath and makeBinPath too? |
|
Strange ofborg-eval not like my commit fb1850c but |
lolbinarycat
left a comment
There was a problem hiding this comment.
hmm, the CI failure is strange, maybe it would be best to go back to using fake derivations instead of real ones.
This reverts commit fb1850c.
done. |
Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com>
infinisil
left a comment
There was a problem hiding this comment.
hmm, the CI failure is strange, maybe it would be best to go back to using fake derivations instead of real ones.
The CI failure was caused by master being broken, it was not related, see #274481 (comment). But yeah using fake derivations here sounds fine.
It would be great to test it a bit more thoroughly though, getOutput is non-trivial:
Lines 1762 to 1765 in 2d96747
Co-authored-by: Silvan Mosberger <github@infinisil.com>
Should I also test getOutput? |
infinisil
left a comment
There was a problem hiding this comment.
Looking good to me now!
Feel free to make further PRs to add more tests, I definitely won't complain about that :P
Yes, as soon as I have time, I'll add some unit tests ^^ |
Description of changes
Add makeIncludePath, it can be usefull to add wrapProgram with C_INCLUDE_PATH
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.