New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vagrant: build and install vagrant-libvirt plugin #52413
Conversation
With this, you can "install" the plugin just by adding the following to ~/vagrant.d/plugins.json: { "version":"1", "installed": { "vagrant-libvirt": { "ruby_version":"2.5.3", "vagrant_version":"2.2.0", "gem_version":"", "require":"", "sources":[] } } }
@calbrecht could you have a look at this? |
sure, i will |
@@ -0,0 +1,96 @@ | |||
From: Antonio Terceiro <terceiro@debian.org> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this an upstream patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's from Debian: https://sources.debian.org/src/vagrant/2.1.5+dfsg-1/debian/patches/0004-Support-system-installed-plugins.patch/
I made a couple of modifications to make it work with Nix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. Patch looks fine to me. Could you mention this link too as source? https://salsa.debian.org/ruby-team/vagrant/blob/cb672c6dc0c63f6552c5ec4d6d7d22929d353503/debian/patches/0004-Support-system-installed-plugins.patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
+ rescue Errno::EROFS | ||
+ # Ignore read-only filesystem against system-installed plugins; regular | ||
+ # users are not supposed to write there. | ||
+ raise unless @system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this some kind of registry of installed plugins or what does this function do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure.
Patch taken from Debian
libvirt and pkgconfig are now buildInputs to ruby-libvirt instead.
7130485
to
c660f3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested installation in a user environment. vagrant-libvirt
is present as system plugin afterwards and works as expected.
I'm just wondering why the sha256 changed for the mini_portile2
gem.
@calbrecht I think you might have accidentally put the wrong hash. nixpkgs/pkgs/servers/monitoring/sensu/gemset.nix Lines 198 to 205 in 92a047a
|
Thanks! |
Motivation for this change
I was having trouble installing vagrant-libvirt with
vagrant plugin install vagrant-libvirt
, and I think it's cleaner to just let Nix manage everything.#26202
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)