12 src = fetchFromGitHub {
15 rev = "refs/tags/v${version}";
16 hash = "sha256-76P4njY/Wb9l4LG+sZwiwQVrvfXCtAELju30GLi7kBE=";
19 vendorHash = "sha256-gBb+qpNFSFhCOYLxXkz3xmyx+3PvyOwLNqjT9zZQuc8=";
24 "-X github.com/drakkan/sftpgo/v2/internal/version.commit=${src.rev}"
25 "-X github.com/drakkan/sftpgo/v2/internal/version.date=1970-01-01T00:00:00Z"
28 nativeBuildInputs = [ installShellFiles ];
32 subPackages = [ "." ];
35 $out/bin/sftpgo gen man
36 installManPage man/*.1
38 installShellCompletion --cmd sftpgo \
39 --bash <($out/bin/sftpgo gen completion bash) \
40 --zsh <($out/bin/sftpgo gen completion zsh) \
41 --fish <($out/bin/sftpgo gen completion fish)
43 shareDirectory="$out/share/sftpgo"
44 mkdir -p "$shareDirectory"
45 cp -r ./{openapi,static,templates} "$shareDirectory"
48 passthru.tests = nixosTests.sftpgo;
51 homepage = "https://github.com/drakkan/sftpgo";
52 changelog = "https://github.com/drakkan/sftpgo/releases/tag/v${version}";
53 description = "Fully featured and highly configurable SFTP server";
55 Fully featured and highly configurable SFTP server
56 with optional HTTP/S, FTP/S and WebDAV support.
57 Several storage backends are supported:
58 local filesystem, encrypted local filesystem, S3 (compatible) Object Storage,
59 Google Cloud Storage, Azure Blob Storage, SFTP.
61 license = with licenses; [ agpl3Only unfreeRedistributable ]; # Software is AGPLv3, web UI is unfree
62 maintainers = with maintainers; [ thenonameguy ];
63 mainProgram = "sftpgo";