Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
74 lines (72 loc) · 2.38 KB
/
Copy pathflake.nix
File metadata and controls
74 lines (72 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
description = "smartvmi";
inputs = {
crane.url = "github:ipetkov/crane/master";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-24-05.url = "github:NixOS/nixpkgs/nixos-24.05";
# source for boost-ext DI. When updating URL to a newer version here,
# remember to also update the version attribute in the bext-di derivation.
bext-di = {
url = "github:boost-ext/di?ref=v1.3.2";
flake = false;
};
libvmi-gdata = {
url = "github:GDATASoftwareAG/libvmi?rev=224b204db82f8648bdd475f2b8a48aa4de143c97";
flake = false;
};
smartvmi = {
url = "github:GDATASoftwareAg/smartvmi";
flake = false;
};
};
outputs =
{ self, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
flake = { };
systems = [ "x86_64-linux" ];
perSystem =
{ system
, self'
, pkgs
, ...
}:
let
old-pkgs = import inputs.nixpkgs-24-05 { inherit system; };
old-libvirt = old-pkgs.libvirt;
bext-di = pkgs.callPackage ./smartvmi/build_bext-di.nix { source = inputs.bext-di; };
yara-cmake = pkgs.callPackage ./smartvmi/build_yara-cmake.nix { };
libvmi-gdata = pkgs.callPackage ./smartvmi/build_libvmi-gdata.nix {
source = inputs.libvmi-gdata;
# libvirt version has to match the version of the libvirt running the VM
libvirt = old-libvirt;
};
in
{
devShells = { };
formatter = pkgs.nixfmt-rfc-style;
packages =
let
vmicore = pkgs.callPackage ./smartvmi/build_vmicore.nix {
inherit bext-di;
craneLib = inputs.crane.mkLib pkgs;
libvmi = libvmi-gdata;
smartvmi-source = inputs.smartvmi;
};
plugins = import ./smartvmi/build_plugins.nix {
inherit pkgs yara-cmake;
smartvmi-source = inputs.smartvmi;
};
in
{
default = pkgs.symlinkJoin {
name = "smartvmi";
paths = [ vmicore ] ++ builtins.attrValues plugins;
};
inherit vmicore;
}
// plugins;
};
};
}