nixpkgs/pkgs/servers/sftpgo/default.nix
Vika bd887df3f2 sftpgo: mark as unfreeRedistributable
Resolves #315154.

New Web UI uses an unfree web theme, and as a result it...

> is allowed for use only within the SFTPGo product and therefore
> cannot be used in derivative works/products without an explicit
> grant from the SFTPGo Team (support@sftpgo.com).

This makes the entire package unfree, which the [SFTPGo license
compliance page][1] supports:

> If you modify SFTPGo's source code and are therefore creating a
> derivative work:
>
> 1. ...
> 2. ...
> 3. You cannot use the UI theme based on KeenThemes because it is
> based on a proprietary theme that we purchased and the WebAdmin and
> WebClient components created using this theme can only be used only
> within SFTPGo and not in derivative works. You must develop and
> maintain your own UI components or adapt the WebAdmin/WebClient
> included in SFTPGo up to version 2.5.6.

@JohnRTitor noted that building from source might not be derivative
work, therefore marking as `unfreeRedistributable`.

[1]: https://sftpgo.com/compliance.html

Co-authored-by: Masum Reza <masumrezarock100@gmail.com>
2024-05-29 17:08:03 +02:00

66 lines
1.8 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, nixosTests
}:
buildGoModule rec {
pname = "sftpgo";
version = "2.6.0";
src = fetchFromGitHub {
owner = "drakkan";
repo = "sftpgo";
rev = "refs/tags/v${version}";
hash = "sha256-HsSBW30qSU3SRyexk2tRjY1FQcBsa70fK3UuT+Gdtm0=";
};
vendorHash = "sha256-BMwEDsXzk8ExygKreWmtkNvhlg3+YU9KcY1pp+9XffI=";
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 = with lib; {
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 licenses; [ agpl3Only unfreeRedistributable ]; # Software is AGPLv3, web UI is unfree
maintainers = with maintainers; [ thenonameguy ];
mainProgram = "sftpgo";
};
}