2023-10-09 19:29:22 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitLab, libcap_ng, libseccomp }:
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "virtiofsd";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.10.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "virtio-fs";
|
|
|
|
repo = "virtiofsd";
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
sha256 = "sha256-qHrgNuPDEtFzucE6ACPemUcjEqOvbo4xV0ru4bP3ATE=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
cargoHash = "sha256-BVl4Inr7ZLnilkPVTD2cjJx9RuqB0Mg230o2c2TLw3I=";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
LIBCAPNG_LIB_PATH = "${lib.getLib libcap_ng}/lib";
|
|
|
|
LIBCAPNG_LINK_TYPE =
|
|
|
|
if stdenv.hostPlatform.isStatic then "static" else "dylib";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
buildInputs = [ libcap_ng libseccomp ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postConfigure = ''
|
|
|
|
sed -i "s|/usr/libexec|$out/bin|g" 50-virtiofsd.json
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 50-virtiofsd.json "$out/share/qemu/vhost-user/50-virtiofsd.json"
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.com/virtio-fs/virtiofsd";
|
|
|
|
description = "vhost-user virtio-fs device backend written in Rust";
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ qyliss astro ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "virtiofsd";
|
2022-02-10 20:34:41 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = with licenses; [ asl20 /* and */ bsd3 ];
|
|
|
|
};
|
|
|
|
}
|