1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
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 05:20:00 +01:00
, installShellFiles
, stdenv
, darwin
}:
2022-09-15 08:38:26 +01:00
rustPlatform.buildRustPackage rec {
pname = "dufs";
version = "0.40.0";
2022-09-15 08:38:26 +01:00
src = fetchFromGitHub {
owner = "sigoden";
repo = "dufs";
2022-09-15 08:38:26 +01:00
rev = "v${version}";
hash = "sha256-BoFoF7V6bTQiJ+afGnivviU/s2ikOxAX06s+AwRxo8Q=";
2022-09-15 08:38:26 +01:00
};
cargoHash = "sha256-B0K/lco7suYM0/02LaDbeqyt4zyiwoeBxhmUPsVTvkw=";
2022-09-15 08:38:26 +01:00
2023-10-01 05:20:00 +01:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
2022-09-15 08:38:26 +01:00
];
2022-12-15 08:14:44 +00: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 16:14:36 +00:00
checkFlags = [
# tests depend on network interface, may fail with virtual IPs.
"--skip=validate_printed_urls"
];
2023-10-01 05:20:00 +01: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 08:38:26 +01: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 08:38:26 +01:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ figsoda holymonson ];
2022-09-15 08:38:26 +01:00
};
}