Closed bobvanderlinden closed 1 year ago
@ryansch could you give this a try?
Seems like the ruby test is still failing
Found out the problem. Bundler was internally still using the Ruby version from nixpkgs.
When I pkgs.bundler.override { ruby = cfg.package; }
I ran into a strange issue where env
inside mkDerivation
was not supported. This was because nixpkgs-ruby
was still based on nixos-22.11
, while devenv was using nixpkgs-unstable
. The env
in mkDerivation
was introduced inbetween these versions(?).
To circumvent this I've let the nixpkgs-ruby input follow nixpkgs in the Ruby example.
I ran the following, which succeeds locally. :crossed_fingers: that this works for CI as well:
git checkout . && git clean -xdf && pushd examples/ruby && mv devenv.yaml devenv.yaml.orig && awk '
{ print }
/^inputs:$/ {
print " devenv:";
print " url: path:../../src/modules";
}
' devenv.yaml.orig > devenv.yaml && popd && devenv-test-example ruby
It seems that the self-hosted MacOS machine doesn't have xcode installed (or isn't up-to-date?). The native dependencies fail to build:
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
I think the x86_64-darwin build automatically comes with xcode installed, so it relies on those libraries to build the native dependencies.
I'm contemplating whether to include darwin.apple_sdk.frameworks.*
or whether rely on preinstalled xcode.
I see that the rust has:
Should this be part of languages.c
?
I'm also wondering whether https://github.com/cachix/devenv/pull/507 would already add CFLAGS
when the right frameworks are chosen.
We should rely on xcode not being installed and list all the deps we need. Most likely #507 addresses this, I'll look into it next week.
For the YAML schema I was hoping we can render it with strictyaml, how can we keep it in sync with the validation logic. Any ideas?
We should rely on xcode not being installed and list all the deps we need.
That would indeed be the most reliable. I'm guessing people aren't using it this way yet though 😅
For the YAML schema I was hoping we can render it with strictyaml, how can we keep it in sync with the validation logic. Any ideas?
Are you referring to making changes in the tests (like awk does currently)? If so, I was thinking maybe all tests could be run inside a Nix build using something like __impure. That way changes to the tests can be reproduced more easily.
But maybe I'm not understanding what you meant by validation logic?
@bobvanderlinden, if you'd like to rebase this over master, I can help iron out the remaining macos issues 🙂
@bobvanderlinden, if you'd like to rebase this over master, I can help iron out the remaining macos issues 🙂
I had some other PRs that were becoming problematic with the lack of a MacOS system, so I have put in some time to get my old x86_64 mac working again. :+1: I was able to reproduce the problem by not installing xcode.
EDIT: Ah! I just saw your addition of libllvm, I think that fixed it here as well. Nice :+1: I rebased the PR.
EDIT: Ah! I just saw your addition of libllvm, I think that fixed it here as well. Nice 👍 I rebased the PR.
Yeah, sorry, I really should've mentioned that 😂
Awesome, thanks!
Currently there is no way to disable bundler nor is it possible to alter the bundler package.
In addition, there was a problem with the prioritization of the ruby/bundler packages, as modern ruby packages include a bundler executable.
This was reported here: https://github.com/bobvanderlinden/nixpkgs-ruby/issues/72
I also wanted to avoid regressions, so I added a stricter example/test.
Resolves https://github.com/bobvanderlinden/nixpkgs-ruby/issues/72