2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "sftpgo";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "2.4.2";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drakkan";
|
|
|
|
repo = "sftpgo";
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-bI4IiYzVorocITkip+Xev3t7vGeMVmqCZn7oR1mAPpI=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
vendorHash = "sha256-+i6jUImDMrsDnIPjIp8uM2BR1IYMqWG1OmvA2w/AfVQ=";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/drakkan/sftpgo/v2/internal/version.commit=${src.rev}"
|
|
|
|
"-X github.com/drakkan/sftpgo/v2/internal/version.date=1970-01-01T00:00:00Z"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
$out/bin/sftpgo gen man
|
|
|
|
installManPage man/*.1
|
|
|
|
|
|
|
|
installShellCompletion --cmd sftpgo \
|
|
|
|
--bash <($out/bin/sftpgo gen completion bash) \
|
|
|
|
--zsh <($out/bin/sftpgo gen completion zsh) \
|
|
|
|
--fish <($out/bin/sftpgo gen completion fish)
|
|
|
|
'';
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
meta = with lib; {
|
2022-11-21 17:40:18 +00:00
|
|
|
homepage = "https://github.com/drakkan/sftpgo";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/drakkan/sftpgo/releases/tag/v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
description = "Fully featured and highly configurable SFTP server";
|
|
|
|
longDescription = ''
|
|
|
|
Fully featured and highly configurable SFTP server
|
|
|
|
with optional HTTP/S, FTP/S and WebDAV support.
|
|
|
|
Several storage backends are supported:
|
|
|
|
local filesystem, encrypted local filesystem, S3 (compatible) Object Storage,
|
|
|
|
Google Cloud Storage, Azure Blob Storage, SFTP.
|
|
|
|
'';
|
2023-01-11 07:51:40 +00:00
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ thenonameguy ];
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
}
|