ChanServ changed the topic of #nixos-ruby to: Everything about using Nix & Ruby. Logs at https://logs.nix.samueldr.com/nixos-ruby/
<manveru> btw i wrote some super simple test for all gems yesterday, 11 are failing
<manveru> they'll need their dependencies fixed, afaict that was so far done in the derivations using the gems instead, hiding the issue :|
<manveru> grpc gem still not compiling at all, seems like an issue with cross-compilation and i have no clue how to fix it
<qyliss^work> can we just drop it? or is it required by something else
<manveru> qyliss^work: it's used by gitlab
<manveru> i think the fix might be simple, i just don't know enough about `ar` to fix it easily
<qyliss^work> me neither :(
<manveru> anyway, i think i can make a pretty good test suite, just wondering how the tests should be run by hydra
<manveru> will later check how python does it
<manveru> qyliss^work: are you still using rbczmq?
<manveru> it hasn't had a release in 3 years and seems like it's incompatible with current czmq
<qyliss^work> I have no idea what I needed that for.
<manveru> i can leave the config, but don't think i'll include it in the set
<manveru> it builds fine, just require fails
<qyliss^work> Yeah, I don't think it needs to be in the set
<manveru> i really wish there was a way to give ffi a load path...
<manveru> down to two failing gems
<manveru> should also be much nicer to build gtk2 ruby apps now
<manveru> also sassc fixed now, only gobject-introspection left, and i think i'll just ignore that one
<manveru> fun fact, nix-shell will read any line in a file starting with `#!nix-shell`, even in the middle of the file :)
<samueldr> it needs to be #! maybe spaces nix-shell space, then whatever
<qyliss^work> that's useful when the language reads the whole file except leading shebang
<qyliss^work> you can hide the second nix-shell from it in a multi-line comment or whatever
<qyliss^work> I forget what language this happened to me with
<samueldr> (I had the same explanation in #nixos-dev, with lua)
<manveru> ah, i forgot to test the gems with all ruby versions...
<qyliss> Don’t worry about 2.3. I plan on killing it as soon as I can get 2.6 to default.
<qyliss> It’s been EOL for a couple of months
<manveru> that's fine, just making tests for all versions available automatically
<manveru> ran into some interesting issues when i tried writing the tests in nix instead of using nix-shell
<manveru> probably got something to do with the hooks in ruby, but it can't find the gem if i try using the withPackages as buildInput
<manveru> now i really want to know how this ever worked
<manveru> why can i require gems in nix-shell but not in mkDerivation
<manveru> guess i need to wrap ruby after all
<manveru> qyliss: do you have a solution for the 2.6 invalid gemspec issue?
<manveru> well, apart from all the breakage from the rubygems bug, i only got 1 other test failure for ruby 2.3, which we can ignore :)
<manveru> bloody hell, now that mkDerivation works, nix-shell is broken...
<manveru> do i really need two separate withPackages?
<qyliss> eh?
<manveru> basically
<manveru> `buildEnv { paths = [ wrappedRuby ] ++ gems; }` works with nix-build, and `mkDerivation { buildInputs = [ wrappedRuby ] ++ gems; }` works with nix-shell...
<manveru> i'm very confused :|
<manveru> zimbatm: you probably know this stuff better
<zimbatm> you can probably also use `runCommandNoCC { buildInputs = ... }` to avoid pulling in GCC and friends
<zimbatm> nix-shell looks at the various build inputs and also honors the nix-support/shell-hook magic
<manveru> hmm
<zimbatm> manveru: how is the nix-build version being used, inside of another derivation?
<zimbatm> or as a build output?
<zimbatm> are other env vars needed beside `GEM_HOME=/path/to/gems`?
<manveru> i'm sure there's a better way :)
<manveru> on a call atm
<zimbatm> it should be possible to use `nix-shell -p 'ruby.withPackages (ps: [ps.pry])'` instead of the longer form you're using
<manveru> what longer form?
<zimbatm> nix-shell -E '(import <nixpkgs> {}).ruby.withPackages (pkgs: with pkgs; [ pry nokogiri ])'
<manveru> yeah, i just want the current nixpkgs
<zimbatm> I had a look but am too tired to unravel everything