mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #76765 from andersk/vagrant-nameerror
vagrant: Resolve crash by replacing gem symlinks with directories
This commit is contained in:
commit
7178637a89
1 changed files with 12 additions and 6 deletions
|
@ -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 {
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue