nixpkgs/pkgs/servers/http/dufs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
2023-10-01 06:20:00 +02:00
, installShellFiles
, stdenv
, darwin
}:
2022-09-15 09:38:26 +02:00
rustPlatform.buildRustPackage rec {
pname = "dufs";
2023-11-09 07:51:16 +01:00
version = "0.37.1";
2022-09-15 09:38:26 +02:00
src = fetchFromGitHub {
owner = "sigoden";
repo = "dufs";
2022-09-15 09:38:26 +02:00
rev = "v${version}";
2023-11-09 07:51:16 +01:00
hash = "sha256-Q5t3FUT/ukGME+ZJXpLWnii2XCPrBVDAlbjW8FrpOZs=";
2022-09-15 09:38:26 +02:00
};
2023-11-09 07:51:16 +01:00
cargoHash = "sha256-6ybYfeufHr3ulTbKe27CDS5m1mCluPwS/5GYemYXat8=";
2022-09-15 09:38:26 +02:00
2023-10-01 06:20:00 +02:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
2022-09-15 09:38:26 +02:00
];
2022-12-15 09:14:44 +01:00
# FIXME: checkPhase on darwin will leave some zombie spawn processes
# see https://github.com/NixOS/nixpkgs/issues/205620
doCheck = !stdenv.isDarwin;
2022-12-05 17:14:36 +01:00
checkFlags = [
# tests depend on network interface, may fail with virtual IPs.
"--skip=validate_printed_urls"
];
2023-10-01 06:20:00 +02:00
postInstall = ''
installShellCompletion --cmd dufs \
--bash <($out/bin/dufs --completions bash) \
--fish <($out/bin/dufs --completions fish) \
--zsh <($out/bin/dufs --completions zsh)
'';
2022-09-15 09:38:26 +02:00
meta = with lib; {
description = "A file server that supports static serving, uploading, searching, accessing control, webdav";
homepage = "https://github.com/sigoden/dufs";
changelog = "https://github.com/sigoden/dufs/blob/${src.rev}/CHANGELOG.md";
2022-09-15 09:38:26 +02:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ figsoda holymonson ];
2022-09-15 09:38:26 +02:00
};
}