1 { lib, stdenv, rustPlatform, fetchFromGitLab, libcap_ng, libseccomp }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitLab {
11 hash = "sha256-2+PiorzYHxShatFbfQCry1bjBNL65/TxEj9MmdKmqP0=";
14 separateDebugInfo = true;
16 cargoHash = "sha256-hXQ/wDDDBV788SvZnYmjiPVrEGCPVusq0O+Uyupgfd0=";
18 LIBCAPNG_LIB_PATH = "${lib.getLib libcap_ng}/lib";
20 if stdenv.hostPlatform.isStatic then "static" else "dylib";
22 buildInputs = [ libcap_ng libseccomp ];
25 sed -i "s|/usr/libexec|$out/bin|g" 50-virtiofsd.json
29 install -Dm644 50-virtiofsd.json "$out/share/qemu/vhost-user/50-virtiofsd.json"
33 homepage = "https://gitlab.com/virtio-fs/virtiofsd";
34 description = "vhost-user virtio-fs device backend written in Rust";
35 maintainers = with maintainers; [ qyliss astro ];
36 mainProgram = "virtiofsd";
37 platforms = platforms.linux;
38 license = with licenses; [ asl20 /* and */ bsd3 ];