You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with (import <nixpkgs> {});
let
gems = bundlerEnv {
name = "botega";
gemdir = ./.;
};
in stdenv.mkDerivation {
name = "botega";
buildInputs = [
gems
gems.wrappedRuby
];
}
and the following Gemfile
source 'https://rubygems.org' do
gem 't'
gem 'shopify-cli'
end
running `nix-shell -p bundler bundix --run 'bundle && bundix' generates a gemfile.lock and a gemset.nix for me no problem
when I run nix-shell I get a build error
If I remove shopify-cli from the gemfile nix-shell works fine and I can use t from within it no problem
I think the relevant error from mkmf.log is conftest.c:16:13: error: conflicting types for 'gzdopen' but I have included the full log below just in case
any ideas on how to get this working and get shopify-cli gem accessible from within a nix-shell?
edit:
I am wondering I this snippet from the nix-shell output is a clue to something being wrong because I thought pkg-config should be provided by bundix by default (as is nokogiri I guess 🤷
Building nokogiri using system libraries.
checking for gzdopen() in -lz... no
checking for gzdopen() in -llibz... no
checking for zlib using `pkg_config`... no
Please install either the `pkg-config` utility or the `pkg-config` rubygem.
checking for gzdopen() in -lz... no
checking for gzdopen() in -llibz... no
full nix-shell build output:
buildFlags: --use-system-libraries --with-zlib-dir=/nix/store/ki8k1a2pkpf862pxa0pms0j9mwjcb2xd-zlib-1.2.11-dev --with-xml2-lib=/nix/store/fhsjz6advdlwa9lki291ra7s5aays9f9-libxml2-2.9.10/lib --with-xml2-include=/nix/store/g23nqnip7zxh7n2346gpz0n3amwzi66i-libxml2-2.9.10-dev/include/libxml2 --with-xslt-lib=/nix/store/xgivc0ij5h7hm1i34v4kfy3xjppkwr8x-libxslt-1.1.34/lib --with-xslt-include=/nix/store/swlgg14vzq6ky07irry08n7pls2ybflg-libxslt-1.1.34-dev/include --with-exslt-lib=/nix/store/xgivc0ij5h7hm1i34v4kfy3xjppkwr8x-libxslt-1.1.34/lib --with-exslt-include=/nix/store/swlgg14vzq6ky07irry08n7pls2ybflg-libxslt-1.1.34-dev/include
WARNING: You build with buildroot.
Build root: /
Bin dir: /nix/store/l4b6qx4iyjjzyy5q752q7mpjdclx44xd-ruby2.6.6-ffi-1.15.3/lib/ruby/gems/2.6.0/bin
Gem home: /nix/store/l4b6qx4iyjjzyy5q752q7mpjdclx44xd-ruby2.6.6-ffi-1.15.3/lib/ruby/gems/2.6.0
WARNING: You build with buildroot.
Build root: /
Bin dir: /nix/store/2mw0n2ibkvxmhnm131wlzn85ncz0qid2-ruby2.6.6-nokogiri-1.11.7/lib/ruby/gems/2.6.0/bin
Gem home: /nix/store/2mw0n2ibkvxmhnm131wlzn85ncz0qid2-ruby2.6.6-nokogiri-1.11.7/lib/ruby/gems/2.6.0
Building native extensions. This could take a while...
Building native extensions with: '--use-system-libraries --with-zlib-dir=/nix/store/ki8k1a2pkpf862pxa0pms0j9mwjcb2xd-zlib-1.2.11-dev --with-xml2-lib=/nix/store/fhsjz6advdlwa9lki291ra7s5aays9f9-libxml2-2.9.10/lib --with-xml2-include=/nix/store/g23nqnip7zxh7n2346gpz0n3amwzi66i-libxml2-2.9.10-dev/include/libxml2 --with-xslt-lib=/nix/store/xgivc0ij5h7hm1i34v4kfy3xjppkwr8x-libxslt-1.1.34/lib --with-xslt-include=/nix/store/swlgg14vzq6ky07irry08n7pls2ybflg-libxslt-1.1.34-dev/include --with-exslt-lib=/nix/store/xgivc0ij5h7hm1i34v4kfy3xjppkwr8x-libxslt-1.1.34/lib --with-exslt-include=/nix/store/swlgg14vzq6ky07irry08n7pls2ybflg-libxslt-1.1.34-dev/include'
This could take a while...
ERROR: Error installing /nix/store/a35hgacdgwh9a52mx6ssf0ijb60axkcn-nokogiri-1.11.7.gem:
ERROR: Failed to build gem native extension.
current directory: /nix/store/2mw0n2ibkvxmhnm131wlzn85ncz0qid2-ruby2.6.6-nokogiri-1.11.7/lib/ruby/gems/2.6.0/gems/nokogiri-1.11.7/ext/nokogiri
/nix/store/hn60d8ywhc5g1mm7wik03y528zcgi7ph-ruby-2.6.6/bin/ruby -I /nix/store/hn60d8ywhc5g1mm7wik03y528zcgi7ph-ruby-2.6.6/lib/ruby/2.6.0 -r ./siteconf20210705-8-j67hgj.rb extconf.rb --use-system-libraries --with-zlib-dir\=/nix/store/ki8k1a2pkpf862pxa0pms0j9mwjcb2xd-zlib-1.2.11-dev --with-xml2-lib\=/nix/store/fhsjz6advdlwa9lki291ra7s5aays9f9-libxml2-2.9.10/lib --with-xml2-include\=/nix/store/g23nqnip7zxh7n2346gpz0n3amwzi66i-libxml2-2.9.10-dev/include/libxml2 --with-xslt-lib\=/nix/store/xgivc0ij5h7hm1i34v4kfy3xjppkwr8x-libxslt-1.1.34/lib --with-xslt-include\=/nix/store/swlgg14vzq6ky07irry08n7pls2ybflg-libxslt-1.1.34-dev/include --with-exslt-lib\=/nix/store/xgivc0ij5h7hm1i34v4kfy3xjppkwr8x-libxslt-1.1.34/lib --with-exslt-include\=/nix/store/swlgg14vzq6ky07irry08n7pls2ybflg-libxslt-1.1.34-dev/include
checking for whether -g is accepted as CFLAGS... yes
checking for whether -Winline is accepted as CFLAGS... yes
checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes
Building nokogiri using system libraries.
checking for gzdopen() in -lz... no
checking for gzdopen() in -llibz... no
checking for zlib using `pkg_config`... no
Please install either the `pkg-config` utility or the `pkg-config` rubygem.
checking for gzdopen() in -lz... no
checking for gzdopen() in -llibz... no
-----
extconf.rb:266:in `ensure_package_configuration'
z is missing. Please locate mkmf.log to investigate how it is failing.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/nix/store/hn60d8ywhc5g1mm7wik03y528zcgi7ph-ruby-2.6.6/bin/$(RUBY_BASE_NAME)
--help
--clean
--prevent-strip
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--with-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-zlib
--without-zlib
--with-libzlib
--without-libzlib
--with-zlib-config
--without-zlib-config
--with-pkg-config
--without-pkg-config
--with-zlib
--without-zlib
--with-libzlib
--without-libzlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/nix/store/2mw0n2ibkvxmhnm131wlzn85ncz0qid2-ruby2.6.6-nokogiri-1.11.7/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/nokogiri-1.11.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /nix/store/2mw0n2ibkvxmhnm131wlzn85ncz0qid2-ruby2.6.6-nokogiri-1.11.7/lib/ruby/gems/2.6.0/gems/nokogiri-1.11.7 for inspection.
Results logged to /nix/store/2mw0n2ibkvxmhnm131wlzn85ncz0qid2-ruby2.6.6-nokogiri-1.11.7/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/nokogiri-1.11.7/gem_make.out
builder for '/nix/store/bcjyf99cy12qd0fas06hdc2asl00m4n5-ruby2.6.6-nokogiri-1.11.7.drv' failed with exit code 1
cannot build derivation '/nix/store/2fyvcwkcl5xl6a2rn5qmjddby6wapzrn-botega.drv': 1 dependencies couldn't be built
error: build of '/nix/store/2fyvcwkcl5xl6a2rn5qmjddby6wapzrn-botega.drv', '/nix/store/fvzk6dplw8gbnls45643s10wpc03hab8-wrapped-ruby-botega.drv' failed
The text was updated successfully, but these errors were encountered:
could really use some help on this, almost three days wasted now trying to get a usable ruby environment up and running. I think it boils down to ruby inside the nix-shell not being able to see zlib but I have added it in multiple different documented ways and just cant seem to figure this out
Hi I have bundix installed using
nix-env -iA bundix
I have the following default.nix
and the following Gemfile
running `nix-shell -p bundler bundix --run 'bundle && bundix' generates a gemfile.lock and a gemset.nix for me no problem
when I run nix-shell I get a build error
If I remove shopify-cli from the gemfile nix-shell works fine and I can use t from within it no problem
I think the relevant error from mkmf.log is
conftest.c:16:13: error: conflicting types for 'gzdopen'
but I have included the full log below just in caseThe mkm.log file for the failure is as follows:
any ideas on how to get this working and get shopify-cli gem accessible from within a nix-shell?
edit:
I am wondering I this snippet from the nix-shell output is a clue to something being wrong because I thought pkg-config should be provided by bundix by default (as is nokogiri I guess 🤷
full nix-shell build output:
The text was updated successfully, but these errors were encountered: