about summary refs log tree commit diff
path: root/pkgs/servers/sftpgo
diff options
context:
space:
mode:
authorKrisztian Szabo <krisztian@deep-impact.ch>2022-10-23 14:44:59 +0200
committerKrisztian Szabo <krisztian@deep-impact.ch>2022-11-18 10:45:39 +0100
commitd26d3c6cf0b7154687c9fab32c02d493c1774845 (patch)
tree3c5877e978a8092e34b117a9ce70f50f187e23ab /pkgs/servers/sftpgo
parentd34d237a728d161da7ce1ee0a39367f251178a33 (diff)
sftpgo: init at 2.4.0
Diffstat (limited to 'pkgs/servers/sftpgo')
-rw-r--r--pkgs/servers/sftpgo/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/servers/sftpgo/default.nix b/pkgs/servers/sftpgo/default.nix
new file mode 100644
index 0000000000000..f59c0b6cc3cab
--- /dev/null
+++ b/pkgs/servers/sftpgo/default.nix
@@ -0,0 +1,52 @@
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
+
+buildGoModule rec {
+  pname = "sftpgo";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "drakkan";
+    repo = "sftpgo";
+    rev = "v${version}";
+    sha256 = "sha256-A4+YmChUPn+6P0rBuzYcABXyjXRZWY5KS1YcFZHCrYo=";
+  };
+
+  vendorHash = "sha256-kwluXCkbclrfRsrdqSxb5+TCBpVPZmDmrbpzR+yuQdQ=";
+
+  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)
+  '';
+
+  meta = {
+    homepage = "https://github.com/drakkan/sftpgo";
+    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 = lib.licenses.agpl3Only;
+    maintainers = with lib.maintainers; [ thenonameguy ];
+  };
+}