Skip to content

Commit

Permalink
buildRubyGem: Make testing easier
Browse files Browse the repository at this point in the history
Don't default `doCheck` to false,
and use the default set of phases
so the phases list does not need to be overriden
in order to add checkPhase or installCheckPhase.
  • Loading branch information
aneeshusa committed Mar 4, 2018
1 parent 1aa59bf commit fced35f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkgs/development/ruby-modules/gem/default.nix
Expand Up @@ -36,7 +36,6 @@ lib.makeOverridable (
rubyName = builtins.parseDrvName ruby.name;
in "${rubyName.name}${rubyName.version}-")
, buildInputs ? []
, doCheck ? false
, meta ? {}
, patches ? []
, gemPath ? []
Expand Down Expand Up @@ -79,7 +78,6 @@ in

stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
inherit ruby;
inherit doCheck;
inherit dontBuild;
inherit dontStrip;
inherit type;
Expand All @@ -96,8 +94,6 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {

inherit src;

phases = attrs.phases or [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" "fixupPhase" ];

unpackPhase = attrs.unpackPhase or ''
runHook preUnpack
Expand Down

6 comments on commit fced35f

@the-kenny
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git-bisecting for a build issue of beam.packages.erlangR20.rebar lead me to this commit as the cause (reverting fixes the build). I'm at a loss how these two could interact.

Do you have any idea how your commit might affect the build of rebar which in terms only depends on erlang?

@aneeshusa
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@the-kenny I did some digging but didn't find anything concrete.
I was able to reproduce your git bisect result. Looking at the rebar -> ruby dependency chain, this is what I see:

rebar3 -> erlang -> wxwidgets -> gtk+ -> cups -> systemd -> libidn2 -> ronn -> ronn-gems -> all the ruby bits

All of these build except the final rebar3, and ronn is a manual building tool, so I'm not really sure how the ruby change broke rebar3.
I also tried a couple of other erlang releases (R19, etc.) which seemed to get past the error the R20 release encountered very early on.

I also did nix-shell --pure -A beam.packages.erlangR20.rebar and didn't see anything ruby or ronn related. I do have sandboxing turned on.

I added a trace to this file to print out the gemName on each instantation; this is the output when instantiating R20 rebar:

trace: ronn
trace: hpricot
trace: mustache
trace: rdiscount
trace: bundler
trace: bundler

This is also the same trace for -A ronn, so these all seem strictly ronn-related.

My only wild remaining guesses are:

  • Something in the Nix bootstrap depends on ruby somehow? (Didn't seem to be the case from my brief survey, though)
  • Some heuristic got broken, think file(1)/libmagic??

Hopefully this helps a bit.

@bkchr
Copy link
Contributor

@bkchr bkchr commented on fced35f Mar 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, git bisect also got me to this commit, for kde systemsettings. Really weird, maybe removing the default phases broke something?

@7c6f434c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkchr Are you sure it is not just a rebuilkd-trigger that set off the whole /bin/sh in sandbox story? #36669 #36919 etc.

@bkchr
Copy link
Contributor

@bkchr bkchr commented on fced35f Mar 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@7c6f434c ohh, yeah you could be right. That could be the problem.

@peterhoeg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something in the Nix bootstrap depends on ruby somehow?

Due to an unrelated ruby issue, I tried upgrading ``bundlerbutnox-review``` went crazy and wanted to rebuild almost the entirely world, so I say it's entirely possible that there is a rogue early ruby dependency somewhere. I don't have more details ATM, sorry.

Please sign in to comment.