vscode-extensions.yoavbls.pretty-ts-errors: 0.5.4 -> 0.6.1 (#363464)
[NixPkgs.git] / pkgs / by-name / di / discourse-mail-receiver / package.nix
blob40fa65bdb5b4d1ac4d0f3349ba994e036fcd37f2
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   ruby,
6   makeWrapper,
7   replace,
8 }:
10 stdenv.mkDerivation rec {
11   pname = "discourse-mail-receiver";
12   version = "4.1.0";
14   src = fetchFromGitHub {
15     owner = "discourse";
16     repo = "mail-receiver";
17     rev = "v${version}";
18     sha256 = "sha256-ob4Hb88odlFf5vSC9qhikhJowo4C5LksVmMuJRMNoI4=";
19   };
21   nativeBuildInputs = [
22     replace
23     makeWrapper
24   ];
25   buildInputs = [ ruby ];
27   dontBuild = true;
29   installPhase = ''
30     mkdir -p $out/bin
32     replace-literal -f -r -e /etc/postfix /run/discourse-mail-receiver .
34     cp -r receive-mail discourse-smtp-fast-rejection $out/bin/
35     cp -r lib $out/
37     wrapProgram $out/bin/receive-mail --set RUBYLIB $out/lib
38     wrapProgram $out/bin/discourse-smtp-fast-rejection --set RUBYLIB $out/lib
39   '';
41   meta = with lib; {
42     homepage = "https://www.discourse.org/";
43     platforms = platforms.linux;
44     maintainers = with maintainers; [ talyz ];
45     license = licenses.mit;
46     description = "Helper program which receives incoming mail for Discourse";
47   };