-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
attribute '"http_parser.rb"' missing #105
Comments
I wonder if this is an error caused by the .rb on the package name. This is the whole error
Any way to debug attrsets.nix with a debugger? Debugging
I don't see http_parser.rb here. However, removing the .rb and the quotes makes nix-shell work!
Obviously it just skips the validation, to make the dependency work properly I had to fork it and rename it. |
Some issue here. Have you found a solution? |
Hey @felipelalli check my Gemfile: https://github.com/retpolanne/retpolanne.com/blob/f87303ce39c8c83b8456527911606e9890a75ce2/Gemfile#L28 I forked it with a different name so I can workaround this issue. PS: make a fork in your own github, for security reasons ;) |
@retpolanne Hey I tried to look into this issue but I have not been able to reproduce it. Do you have a minimal reproducible recipe? I've tried with the following # Gemfile
source "https://rubygems.org"
# Generate the lock and gemset file by
# rm Gemfile.lock gemset.nix
# nix-shell -p ruby_3_2 bundix
# bundle lock
# bundix
gem "http_parser.rb" # default.nix
{ system ? builtins.currentSystem, nixpkgs ? fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/23.05.tar.gz";
sha256 = "10wn0l08j9lgqcw8177nh2ljrnxdrpri7bp0g7nvrsn9rkawvlbf";
}, pkgs ? import nixpkgs {
overlays = [ ];
config = { };
inherit system;
} }:
let
ruby = pkgs.ruby_3_2;
gems = pkgs.bundlerEnv {
inherit ruby;
name = "jekyll-gems";
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in
{
shell = pkgs.stdenv.mkDerivation {
name = "jekyll_env";
src = ./.;
buildInputs = [
gems
gems.wrappedRuby
];
};
} and the following works cd ~/src/bundix-http-parser.rb
$ nix-shell -A shell
these 3 derivations will be built:
/nix/store/4vlyrj5p9ka7nm1bdvbi882bf5p4iqj0-gemfile-and-lockfile.drv
/nix/store/bgbipxqjywsk8xviar3wr2wzi5350wg2-jekyll-gems.drv
/nix/store/f56rgy57dn50jkhp8hmxk7fv6s6p72gl-wrapped-ruby-jekyll-gems.drv
building '/nix/store/4vlyrj5p9ka7nm1bdvbi882bf5p4iqj0-gemfile-and-lockfile.drv'...
building '/nix/store/bgbipxqjywsk8xviar3wr2wzi5350wg2-jekyll-gems.drv'...
created 6 symlinks in user environment
building '/nix/store/f56rgy57dn50jkhp8hmxk7fv6s6p72gl-wrapped-ruby-jekyll-gems.drv'...
patching sources
configuring
no configure script, doing nothing
building
running tests
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/ruby
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/racc
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/rdbg
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/erb
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/typeprof
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/ri
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/rdoc
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/rbs
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/rake
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/bundle
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/bundler
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/gem
shrinking /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin/irb
checking for references to /build/ in /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems...
patching script interpreter paths in /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems
stripping (with command strip and flags -S -p) in /nix/store/s5zcf1vi685dhfpb34vk4d9iz1pyxpyg-wrapped-ruby-jekyll-gems/bin
[nix-shell:~/src/bundix-http-parser.rb]$ irb
>> require 'http/parser'
=> true Are you using jruby as the ruby? |
@PuercoPop can you share the generated gemset.nix? That looks like a minimal example to me. |
Sure this is the setup I've used to trying to reproduce ithe issue https://github.com/PuercoPop/bundix-http-parser.rb Note: One thing I haven't done when generating the lock file but I normally do is to set |
@PuercoPop yea, from what I see your setup should trigger this bug. Weird why it didn't trigger it. Maybe it's fixed? |
@retpolanne I think the difference that triggers the issue was due to including the
|
Hey folks!
I'm trying to code a nix-shell for my Jekyll project. However, I get this error:
I see that http_parser.rb is my Gemfile:
This is my shell.nix file
In my gemset.nix, http_parser.rb is the only dependency with quotes surrounding it, because of the .rb extension maybe
If I remove this dependency, the shell starts fine, albeit with some errors from Jekyll.
Trace attached.
nix-shell-trace.txt
The text was updated successfully, but these errors were encountered: