nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 55 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchFromGitLab, 6 libcap_ng, 7 libseccomp, 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "virtiofsd"; 12 version = "1.13.2"; 13 14 src = fetchFromGitLab { 15 owner = "virtio-fs"; 16 repo = "virtiofsd"; 17 rev = "v${version}"; 18 hash = "sha256-7ShmdwJaMjaUDSFnzHnsTQ/CmAQ0qpZnX5D7cFYHNmo="; 19 }; 20 21 separateDebugInfo = true; 22 23 cargoHash = "sha256-Y07SJ54sw4CPCPq/LoueGBfHuZXu9F32yqMR6LBJ09I="; 24 25 LIBCAPNG_LIB_PATH = "${lib.getLib libcap_ng}/lib"; 26 LIBCAPNG_LINK_TYPE = if stdenv.hostPlatform.isStatic then "static" else "dylib"; 27 28 buildInputs = [ 29 libcap_ng 30 libseccomp 31 ]; 32 33 postConfigure = '' 34 sed -i "s|/usr/libexec|$out/bin|g" 50-virtiofsd.json 35 ''; 36 37 postInstall = '' 38 install -Dm644 50-virtiofsd.json "$out/share/qemu/vhost-user/50-virtiofsd.json" 39 ''; 40 41 meta = with lib; { 42 homepage = "https://gitlab.com/virtio-fs/virtiofsd"; 43 description = "vhost-user virtio-fs device backend written in Rust"; 44 maintainers = with maintainers; [ 45 qyliss 46 astro 47 ]; 48 mainProgram = "virtiofsd"; 49 platforms = platforms.linux; 50 license = with licenses; [ 51 asl20 # and 52 bsd3 53 ]; 54 }; 55}