Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions pkgs/development/tools/vagrant/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ let
inherit version;
};
} // lib.optionalAttrs withLibvirt (import ./gemset_libvirt.nix));

# This replaces the gem symlinks with directories, resolving this
# error when running vagrant (I have no idea why):
# /nix/store/p4hrycs0zaa9x0gsqylbk577ppnryixr-vagrant-2.2.6/lib/ruby/gems/2.6.0/gems/i18n-1.1.1/lib/i18n/config.rb:6:in `<module:I18n>': uninitialized constant I18n::Config (NameError)
postBuild = ''
for gem in "$out"/lib/ruby/gems/*/gems/*; do
cp -a "$gem/" "$gem.new"
rm "$gem"
mv "$gem.new" "$gem"
done
'';
};

in buildRubyGem rec {
Expand Down Expand Up @@ -79,12 +90,7 @@ in buildRubyGem rec {
'';

installCheckPhase = ''
if [[ "$("$out/bin/vagrant" --version)" == "Vagrant ${version}" ]]; then
echo 'Vagrant smoke check passed'
else
echo 'Vagrant smoke check failed'
return 1
fi
HOME="$(mktemp -d)" $out/bin/vagrant init --output - > /dev/null
'';

# `patchShebangsAuto` patches this one script which is intended to run
Expand Down