diff --git a/pkgs/by-name/vi/virtiofsd/package.nix b/pkgs/by-name/vi/virtiofsd/package.nix index 37421a78941e..a9bf7b47ca1e 100644 --- a/pkgs/by-name/vi/virtiofsd/package.nix +++ b/pkgs/by-name/vi/virtiofsd/package.nix @@ -5,16 +5,17 @@ fetchFromGitLab, libcap_ng, libseccomp, + versionCheckHook, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "virtiofsd"; version = "1.13.3"; src = fetchFromGitLab { owner = "virtio-fs"; repo = "virtiofsd"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-H8FjnrwB6IfZ7pVFesEWZkWpWjVYGrewlPRZc97Nlh8="; }; @@ -38,8 +39,14 @@ rustPlatform.buildRustPackage rec { install -Dm644 50-virtiofsd.json "$out/share/qemu/vhost-user/50-virtiofsd.json" ''; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + meta = with lib; { homepage = "https://gitlab.com/virtio-fs/virtiofsd"; + changelog = "https://gitlab.com/virtio-fs/virtiofsd/-/releases/v${finalAttrs.version}"; description = "vhost-user virtio-fs device backend written in Rust"; maintainers = with maintainers; [ qyliss @@ -52,4 +59,4 @@ rustPlatform.buildRustPackage rec { bsd3 ]; }; -} +})