vagrant: Support system-installed plugins

Patch taken from Debian
This commit is contained in:
Matthew Harm Bekkema
2018-12-17 21:53:23 +11:00
parent 1183ee645d
commit 08488bcf94
2 changed files with 106 additions and 0 deletions
@@ -40,8 +40,14 @@ in buildRubyGem rec {
patches = [
./unofficial-installation-nowarn.patch
./use-system-bundler-version.patch
./0004-Support-system-installed-plugins.patch
];
postPatch = ''
substituteInPlace lib/vagrant/plugin/manager.rb --subst-var-by \
system_plugin_dir "$out/vagrant-plugins"
'';
# PATH additions:
# - libarchive: Make `bsdtar` available for extracting downloaded boxes
postInstall = ''
@@ -53,6 +59,9 @@ in buildRubyGem rec {
--prefix PKG_CONFIG_PATH ':' \
"${lib.makeSearchPath "lib/pkgconfig" [ libvirt ]}"
''}
mkdir -p "$out/vagrant-plugins/plugins.d"
echo '{}' > "$out/vagrant-plugins/plugins.json"
'';
installCheckPhase = ''