Smartvmi nix packaging#1
Merged
lbeierlieb merged 12 commits intomainfrom May 12, 2025
Merged
Conversation
boost-ext DI is a dependency of smartvmi but not available in nixpkgs. This commit adds a custom derivation for boost-ext di v1.3.2.
yara is a dependency of smartvmi's inmemoryscanner plugin. yara is available in nixpkgs, but it is not a CMake project. Thus, the yara package from nixpkgs does not provided a ...config.cmake file, which is required, so that CMake can find yara when building smartvmi. This commit overrides the original yara package and adds a yara-config.cmake file.
smartvmi currently depends on a fork of libvmi, where GDATA added features (necessary for smartvmi), which are not yet upstream in the libvmi project. libvmi is available in nixpkgs, but GDATA's fork is not. This commit adds a derivation to build the fork. All dependency are provided, so all features (notable Xen and non-legacy KVM-VMI support) are enabled.
The CMake build of smartvmi uses Corrosion to integrate the Rust-based gRPC component. This commit adds a derivation to build the cxxbridge-cmd, which generates the C++ glue files.
add derivation for the CMake build of smartvmi.
add a derivation and additional Nix code to build the apitracing and inmemoryscanner plugins. The builds are also based on CMake.
Originally, we developed the smartvmi nix packaging in the smartvmi repository, so putting the .nix files into a nix folder made sense. Now, this repository is providing only nix packaging and nixos modules; thus, a folder structure based on packages/modules is more useful.
Previously, the nix packaging lived inside of the smartvmi repository, so the path refered to local folders/files. Now, retrieve the source from github (for now from a fork, because a few changes required for Nix are yet to be upstreamed).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds Nix packaging for building smartvmi. Currently, upstream smartvmi is missing some changes (CMake configuration, Cargo.lock) that the Nix build requires; until that problem is resolved, we refer to a smartvmi fork that has the necessary changes applied.