nixpkgs/pkgs/servers/sftpgo/default.nix

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

65 lines
1.7 KiB
Nix
Raw Normal View History

2023-01-07 23:21:39 +01:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
2023-04-19 15:13:54 +02:00
, nixosTests
2023-01-07 23:21:39 +01:00
}:
2022-10-23 14:44:59 +02:00
buildGoModule rec {
pname = "sftpgo";
2023-06-27 12:27:08 +02:00
version = "2.5.2";
2022-10-23 14:44:59 +02:00
src = fetchFromGitHub {
owner = "drakkan";
repo = "sftpgo";
2023-01-07 23:21:39 +01:00
rev = "refs/tags/v${version}";
2023-06-27 12:27:08 +02:00
hash = "sha256-yGbnnva3Uhdl8Pii6DvHzF8PugLDdGsjm+Izf7lh0HI=";
2022-10-23 14:44:59 +02:00
};
2023-06-27 12:27:08 +02:00
vendorHash = "sha256-9x421lU9K1qfJroIu+obxD3H1R+8QUawlnQnPFQ0P6o=";
2022-10-23 14:44:59 +02: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)
shareDirectory="$out/share/sftpgo"
mkdir -p "$shareDirectory"
cp -r ./{openapi,static,templates} "$shareDirectory"
2022-10-23 14:44:59 +02:00
'';
2023-04-19 15:13:54 +02:00
passthru.tests = nixosTests.sftpgo;
2023-01-07 23:21:39 +01:00
meta = with lib; {
2022-10-23 14:44:59 +02:00
homepage = "https://github.com/drakkan/sftpgo";
2023-01-07 23:21:39 +01:00
changelog = "https://github.com/drakkan/sftpgo/releases/tag/v${version}";
2022-10-23 14:44:59 +02: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-07 23:21:39 +01:00
license = licenses.agpl3Only;
2023-04-20 13:14:52 +02:00
maintainers = with maintainers; [ thenonameguy yayayayaka ];
2022-10-23 14:44:59 +02:00
};
}