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
libvmi: init at 0.12 #42683
libvmi: init at 0.12 #42683
Conversation
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.
@GrahamcOfBorg build libvmi
src = fetchFromGitHub { | ||
owner = "libvmi"; | ||
repo = "libvmi"; | ||
rev = "6934e8a4758018983ec53ec791dd14a7d6ac31a9"; |
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.
You can set version = "0.12.0"
, then use rev = "v${version}"
''; | ||
license = with licenses; [ gpl3 lgpl3 ]; | ||
maintainers = with maintainers; [ lschuermann ]; | ||
}; |
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.
Can you add the platforms
attribute as well?
@GrahamcOfBorg build libvmi |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: libvmi Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: libvmi Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libvmi Partial log (click to expand)
|
sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv"; | ||
}; | ||
|
||
buildInputs = [ glib which libvirt json_c ] ++ (optional xenSupport xen); |
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.
which
is not needed.
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'll throw it out.
}; | ||
|
||
buildInputs = [ glib which libvirt json_c ] ++ (optional xenSupport xen); | ||
nativeBuildInputs = [ autoreconfHook yacc bison flex libtool autoconf automake pkgconfig ]; |
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.
yacc
, autoconf
and automake
aren't needed.
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.
Yes, you're right. I didn't question the inputs from @proteansec. Only one of either yacc
or bison
is required. I'll remove yacc
.
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 guess autoconf
and automake
are implicitly marked as nativeBuildInputs
by autoreconfHook
?
For me, it also builds successfully without libtool
. I'll remove that too.
details of a running virtual machine by viewing its memory, trapping on hardware events, | ||
and accessing the vCPU registers. | ||
''; | ||
license = with licenses; [ gpl3 lgpl3 ]; |
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.
Why double licensed? I can only find LGPL3.0 in their repo
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.
This also had me confused. Since this commit, they are dual licensed under the GPL3 and LGPL3. You'll find COPYING
and COPYING.LESSER
in the repo.
Motivation for this change
With #26162 there already is an attempt to create a nix derivation for libvmi, which seems to have stagnated. This work is based off of this original pull request but resolves merge conflicts and updates the library to its current release, v0.12.
It also adds an option to disable Xen support entirely.
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)I'm currently investigating whether it is also possible and makes sense to provide an option for disabling KVM support.
Additionally, for libvmi to work fast on KVM, they provide a patch for QEMU which integrates further debug interfaces. I'll test this patch and try to create another QEMU derivation with the libvmi integrations.