Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
73 lines
1.9 KiB
Nix
73 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nixosTests,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "sftpgo";
|
|
version = "2.6.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "drakkan";
|
|
repo = "sftpgo";
|
|
tag = "v${version}";
|
|
hash = "sha256-SembD+BM5Zetexh0iLTfrq/I1tz2BCwGUn6OyFeTHF4=";
|
|
};
|
|
|
|
vendorHash = "sha256-7hS4E7PXlydHFi4ul5+hyUPOvozialXW/m1tDLqbQUs=";
|
|
|
|
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"
|
|
'';
|
|
|
|
passthru.tests = nixosTests.sftpgo;
|
|
|
|
meta = {
|
|
homepage = "https://github.com/drakkan/sftpgo";
|
|
changelog = "https://github.com/drakkan/sftpgo/releases/tag/v${version}";
|
|
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.
|
|
'';
|
|
license = with lib.licenses; [
|
|
agpl3Only
|
|
unfreeRedistributable
|
|
]; # Software is AGPLv3, web UI is unfree
|
|
maintainers = with lib.maintainers; [
|
|
thenonameguy
|
|
ryan4yin
|
|
];
|
|
mainProgram = "sftpgo";
|
|
};
|
|
}
|