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
I'm attempting to enable jemalloc with ruby, which appears to work fine, but it isn't available to gems. I thought that maybe since it was in ruby's propagatedBuildInputs, the gems would have it, but no.
pkgs=importnixpkgs{inheritsystem;overlays=[bob-ruby.overlays.default];};rubyNix=ruby-nix.libpkgs;gemset=ifbuiltins.pathExists./gemset.nix then import./gemset.nix else {};rubyVersion=nixpkgs.lib.fileContents./.ruby-version;ruby=pkgs."${rubyVersion}".override{jemallocSupport=true;yjitSupport=true;};
I wrote a function to add it to each gem's buildInputs, but merging that with defaultGemConfig replaces the existing builtInputs, so perhaps a "deep merge" is needed instead:
in rec{inherit(rubyNix{inheritgemsetruby;name="chronos";gemConfig=pkgs.defaultGemConfig//jemallocGemConfig;})env;devShells=rec{dev=pkgs.mkShell{buildInputs=[env]};default=dev;};};
But I'm probably thinking about this the wrong way. Surely there's some better/simpler way to use jemalloc with gems. I can try posting this to the bundix repo as well if that makes more sense.
The text was updated successfully, but these errors were encountered:
Also, it would not work out of the box until jemalloc is added to propagatedBuildInputs, it is currently added to buildInputs, I have filed another PR for that
I'm attempting to enable jemalloc with ruby, which appears to work fine, but it isn't available to gems. I thought that maybe since it was in ruby's
propagatedBuildInputs
, the gems would have it, but no.I wrote a function to add it to each gem's buildInputs, but merging that with
defaultGemConfig
replaces the existing builtInputs, so perhaps a "deep merge" is needed instead:But I'm probably thinking about this the wrong way. Surely there's some better/simpler way to use jemalloc with gems. I can try posting this to the bundix repo as well if that makes more sense.
The text was updated successfully, but these errors were encountered: