From f3170f025c0c3701e59dabe0342ffd246963c45e Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 23 Jul 2022 16:00:43 +0800 Subject: [PATCH] vsmtp: init at 1.3.3 --- pkgs/servers/mail/vsmtp/default.nix | 49 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 51 insertions(+) create mode 100644 pkgs/servers/mail/vsmtp/default.nix diff --git a/pkgs/servers/mail/vsmtp/default.nix b/pkgs/servers/mail/vsmtp/default.nix new file mode 100644 index 000000000000..dc3584ab03d8 --- /dev/null +++ b/pkgs/servers/mail/vsmtp/default.nix @@ -0,0 +1,49 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, pkg-config +, installShellFiles +, openssl +, testers +, vsmtp +}: + +rustPlatform.buildRustPackage rec { + pname = "vsmtp"; + version = "1.3.3"; + + src = fetchFromGitHub { + owner = "viridIT"; + repo = "vsmtp"; + rev = "v${version}"; + hash = "sha256-nBkfIjACmjnVNF3hJ22B4ecjWrX9licV7c8Yxv2tQCg="; + }; + + cargoHash = "sha256-HqQ8WD1/K7xMx97SbuP45Q/+4oADh1WZFJPXB8wlkbM="; + + nativeBuildInputs = [ pkg-config installShellFiles ]; + buildInputs = [ openssl ]; + + cargoBuildFlags = [ + "--package" + "vsmtp" + "--package" + "vqueue" + ]; + + postInstall = '' + installManPage tools/install/man/*.1 + ''; + + passthru = { + tests.version = testers.testVersion { package = vsmtp; version = "v${version}"; }; + }; + + meta = with lib; { + description = "A next-gen mail transfer agent (MTA) written in Rust"; + homepage = "https://viridit.com"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ nickcao ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df2dfd32e44e..4721b22448d0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22463,6 +22463,8 @@ with pkgs; vrpn = callPackage ../development/libraries/vrpn { }; + vsmtp = callPackage ../servers/mail/vsmtp { }; + vsqlite = callPackage ../development/libraries/vsqlite { }; vte = callPackage ../development/libraries/vte {