about summary refs log tree commit diff
path: root/pkgs/tools/filesystems
diff options
context:
space:
mode:
authorAnthony Roussel <anthony@roussel.dev>2024-03-30 16:39:19 +0100
committerAnthony Roussel <anthony@roussel.dev>2024-03-30 17:34:43 +0100
commit2ebe93cb8caf8c07efaa8d8723503c6c4028cc8d (patch)
tree54780cb7ed7244936d1fd2aa754e2476b68ae174 /pkgs/tools/filesystems
parentb65cd9bb4df254b62fb7a97d175f1a5792505c11 (diff)
httpdirfs: add passthru.{tests.version,updateScript}
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r--pkgs/tools/filesystems/httpdirfs/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/tools/filesystems/httpdirfs/default.nix b/pkgs/tools/filesystems/httpdirfs/default.nix
index 1d4952edcbf9a..caf75a26b74c9 100644
--- a/pkgs/tools/filesystems/httpdirfs/default.nix
+++ b/pkgs/tools/filesystems/httpdirfs/default.nix
@@ -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;
   };
-}
+})