2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitLab, fetchpatch, libcap_ng, libseccomp }:
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "virtiofsd";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.6.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "virtio-fs";
|
|
|
|
repo = "virtiofsd";
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "/KL1LH/3txWrZPjvuYmSkNb93euB+Whd2YofIuf/cMg=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
|
|
|
# fixes SIGSYS when seccomp filtering is on
|
|
|
|
# https://gitlab.com/virtio-fs/virtiofsd/-/issues/104
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/virtio-fs/virtiofsd/-/commit/a9141cae72e6785ca10a758c22c7a5690a1fc955.patch";
|
|
|
|
hash = "sha256-uO8nVdNMGOkd3ThTTw23BykDP9w4I+lEx91447zxcgo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoHash = "sha256-EkDop9v75IIIWEK+QI5v58lO20RxgJab/scFmn26idU=";
|
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 ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.com/virtio-fs/virtiofsd";
|
|
|
|
description = "vhost-user virtio-fs device backend written in Rust";
|
|
|
|
maintainers = with maintainers; [ qyliss ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = with licenses; [ asl20 /* and */ bsd3 ];
|
|
|
|
};
|
|
|
|
}
|