httpdirfs: add passthru.{tests.version,updateScript}

This commit is contained in:
Anthony Roussel 2024-03-30 16:39:19 +01:00
parent b65cd9bb4d
commit 2ebe93cb8c
No known key found for this signature in database
GPG key ID: 9DC4987B1A55E75E

View file

@ -6,18 +6,20 @@
gumbo,
lib,
libuuid,
nix-update-script,
pkg-config,
stdenv,
testers,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "httpdirfs";
version = "1.2.3";
src = fetchFromGitHub {
owner = "fangfufu";
repo = pname;
rev = "refs/tags/${version}";
repo = "httpdirfs";
rev = "refs/tags/${finalAttrs.version}";
sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A=";
};
@ -33,6 +35,17 @@ stdenv.mkDerivation rec {
makeFlags = [ "prefix=${placeholder "out"}" ];
passthru = {
# Disabled for Darwin because requires macFUSE installed outside NixOS
tests.version = lib.optionalAttrs stdenv.isLinux (
testers.testVersion {
command = "${lib.getExe finalAttrs.finalPackage} --version";
package = finalAttrs.finalPackage;
}
);
updateScript = nix-update-script { };
};
meta = {
description = "A FUSE filesystem for HTTP directory listings";
homepage = "https://github.com/fangfufu/httpdirfs";
@ -41,4 +54,4 @@ stdenv.mkDerivation rec {
maintainers = with lib.maintainers; [ sbruder schnusch ];
platforms = lib.platforms.unix;
};
}
})