Skip to content

Smartvmi nix packaging#1

Merged
lbeierlieb merged 12 commits intomainfrom
smartvmi
May 12, 2025
Merged

Smartvmi nix packaging#1
lbeierlieb merged 12 commits intomainfrom
smartvmi

Conversation

@lbeierlieb
Copy link
Copy Markdown
Collaborator

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.

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.
@lbeierlieb lbeierlieb self-assigned this May 12, 2025
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).
@lbeierlieb lbeierlieb merged commit ed3ccde into main May 12, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant