9 rustPlatform.buildRustPackage rec {
13 src = fetchFromGitHub {
17 hash = "sha256-BoFoF7V6bTQiJ+afGnivviU/s2ikOxAX06s+AwRxo8Q=";
20 cargoHash = "sha256-B0K/lco7suYM0/02LaDbeqyt4zyiwoeBxhmUPsVTvkw=";
22 nativeBuildInputs = [ installShellFiles ];
24 buildInputs = lib.optionals stdenv.isDarwin [
25 darwin.apple_sdk.frameworks.Security
28 # FIXME: checkPhase on darwin will leave some zombie spawn processes
29 # see https://github.com/NixOS/nixpkgs/issues/205620
30 doCheck = !stdenv.isDarwin;
32 # tests depend on network interface, may fail with virtual IPs.
33 "--skip=validate_printed_urls"
37 installShellCompletion --cmd dufs \
38 --bash <($out/bin/dufs --completions bash) \
39 --fish <($out/bin/dufs --completions fish) \
40 --zsh <($out/bin/dufs --completions zsh)
44 description = "A file server that supports static serving, uploading, searching, accessing control, webdav";
46 homepage = "https://github.com/sigoden/dufs";
47 changelog = "https://github.com/sigoden/dufs/blob/${src.rev}/CHANGELOG.md";
48 license = with licenses; [ asl20 /* or */ mit ];
49 maintainers = with maintainers; [ figsoda holymonson ];