about summary refs log tree commit diff
path: root/pkgs/by-name/xe/xen-guest-agent/package.nix
blob: 55ecf68429e386c2dfc7a0a9ec5526d4a5ea9594 (plain) (blame)
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
{
  lib,
  fetchFromGitLab,
  rustPlatform,
  llvmPackages,
  pkg-config,
  xen-slim,
}:
rustPlatform.buildRustPackage rec {
  pname = "xen-guest-agent";
  version = "0.4.0-unstable-2024-05-31";

  src = fetchFromGitLab {
    owner = "xen-project";
    repo = pname;
    rev = "03aaadbe030f303b1503e172ee2abb6d0cab7ac6";
    hash = "sha256-OhzRsRwDvt0Ov+nLxQSP87G3RDYSLREMz2w9pPtSUYg=";
  };

  cargoHash = "sha256-E6QKh4FFr6sLAByU5n6sLppFwPHSKtKffhQ7FfdXAu4=";

  nativeBuildInputs = [
    rustPlatform.bindgenHook
    llvmPackages.clang
    pkg-config
  ];

  buildInputs = [ xen-slim ];


  postFixup = ''
    patchelf $out/bin/xen-guest-agent --add-rpath ${xen-slim.out}/lib
  '';

  meta = {
    description = "Xen agent running in Linux/BSDs (POSIX) VMs";
    homepage = "https://gitlab.com/xen-project/xen-guest-agent";
    license = lib.licenses.agpl3Only;
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [
      matdibu
      sigmasquadron
    ];
  };
}