From 664cfba168b9c0f4205f82dcf45ef0fd6f547f84 Mon Sep 17 00:00:00 2001 From: Monson Shao Date: Thu, 15 Sep 2022 15:38:26 +0800 Subject: [PATCH] dufs: init at 0.30.0 --- pkgs/servers/http/dufs/default.nix | 32 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/servers/http/dufs/default.nix diff --git a/pkgs/servers/http/dufs/default.nix b/pkgs/servers/http/dufs/default.nix new file mode 100644 index 000000000000..c89ccb8c7b13 --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bbcaac916526..f5a0f777f42a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -446,6 +446,10 @@ with pkgs; dsq = callPackage ../tools/misc/dsq { }; + dufs = callPackage ../servers/http/dufs { + inherit (darwin.apple_sdk.frameworks) Security; + }; + each = callPackage ../tools/text/each { }; eclipse-mat = callPackage ../development/tools/eclipse-mat { };