about summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authorMonson Shao <holymonson@gmail.com>2022-09-15 15:38:26 +0800
committerMonson Shao <holymonson@gmail.com>2022-09-28 15:33:55 +0800
commit664cfba168b9c0f4205f82dcf45ef0fd6f547f84 (patch)
tree8d1e12f53902722895c61d9e607cca0a6636259e /pkgs/servers/http
parent467132e5ab10f122fbe313ebcc31eeaca65fae42 (diff)
dufs: init at 0.30.0
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/dufs/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/servers/http/dufs/default.nix b/pkgs/servers/http/dufs/default.nix
new file mode 100644
index 0000000000000..c89ccb8c7b136
--- /dev/null
+++ b/pkgs/servers/http/dufs/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub, rustPlatform, Security, openssl, pkg-config }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "dufs";
+  version = "0.30.0";
+
+  src = fetchFromGitHub {
+    owner = "sigoden";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-UJ93yUJqxkP+PyUrhKkjV90vr55MemC1zRbzh/gFqPU=";
+  };
+
+  cargoSha256 = "sha256-dyn0wj11MC9NYwULsR6ytYUl+8wsRkVLBIwcgM5mMNQ=";
+
+  nativeBuildInputs = lib.optionals stdenv.isLinux [
+    pkg-config
+  ];
+
+  buildInputs = lib.optionals stdenv.isLinux [
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    Security
+  ];
+
+  meta = with lib; {
+    description = "A file server that supports static serving, uploading, searching, accessing control, webdav";
+    homepage = "https://github.com/sigoden/dufs";
+    license = with licenses; [ asl20 /* or */ mit ];
+    maintainers = [ maintainers.holymonson ];
+  };
+}