webdav-server-rs: init at unstable-2021-08-16
This commit is contained in:
parent
640e54cda9
commit
34ec1a380a
2 changed files with 49 additions and 0 deletions
47
pkgs/servers/webdav-server-rs/default.nix
Normal file
47
pkgs/servers/webdav-server-rs/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, libtirpc
|
||||
, pam
|
||||
, rpcsvc-proto
|
||||
, enablePAM ? stdenv.isLinux
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "webdav-server-rs";
|
||||
# The v0.4.0 tag cannot build. So we use the 547602e commit.
|
||||
version = "unstable-2021-08-16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "miquels";
|
||||
repo = pname;
|
||||
rev = "547602e78783935b4ddd038fb795366c9c476bcc";
|
||||
sha256 = "sha256-nTygUEjAUXD0mRTmjt8/UPVfZA4rP6oop1s/fI5mYeg=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-TDDfGQig4i/DpsilTPqMQ1oT0mXK5DKlZmwsPPLrzFc=";
|
||||
|
||||
buildInputs = [ libtirpc ] ++ lib.optional enablePAM pam;
|
||||
nativeBuildInputs = [ rpcsvc-proto ];
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
buildFeatures = [ "quota" ] ++ lib.optional enablePAM "pam";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace fs_quota/build.rs \
|
||||
--replace '/usr/include/tirpc' '${libtirpc.dev}/include/tirpc'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An implementation of WebDAV server in Rust";
|
||||
longDescription = ''
|
||||
webdav-server-rs is an implementation of WebDAV with full support for
|
||||
RFC4918. It also supports local unix accounts, PAM authentication, and
|
||||
quota.
|
||||
'';
|
||||
homepage = "https://github.com/miquels/webdav-server-rs";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ pmy ];
|
||||
};
|
||||
}
|
|
@ -21697,6 +21697,8 @@ with pkgs;
|
|||
|
||||
webdav = callPackage ../servers/webdav { };
|
||||
|
||||
webdav-server-rs = callPackage ../servers/webdav-server-rs { };
|
||||
|
||||
webmetro = callPackage ../servers/webmetro { };
|
||||
|
||||
wsdd = callPackage ../servers/wsdd { };
|
||||
|
|
Loading…
Reference in a new issue