about summary refs log tree commit diff
path: root/pkgs/servers/mail/mlmmj/default.nix
blob: 76ce2d011599869149b5721b5b89f94757724655 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  stdenv,
  fetchFromGitea,
  autoreconfHook,
  atf,
  pkg-config,
  kyua,
}:
stdenv.mkDerivation rec {
  pname = "mlmmj";
  version = "1.4.7";

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = pname;
    repo = pname;
    rev = "refs/tags/RELEASE_" + lib.replaceStrings ["."] ["_"] version;
    hash = "sha256-QetxCxny9elPetKuAsgKF0xTov1bNIRxi7gWhv6dYyU=";
  };

  nativeBuildInputs = [autoreconfHook atf pkg-config kyua];

  configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
    # AC_FUNC_MALLOC is broken on cross builds.
    "ac_cv_func_malloc_0_nonnull=yes"
    "ac_cv_func_realloc_0_nonnull=yes"
  ];

  postInstall = ''
    # grab all documentation files
    docfiles=$(find -maxdepth 1 -name "[[:upper:]][[:upper:]]*")
    install -vDm 644 -t $out/share/doc/mlmmj/ $docfiles
  '';

  meta = with lib; {
    homepage = "http://mlmmj.org";
    description = "Mailing List Management Made Joyful";
    maintainers = [maintainers.edwtjo];
    platforms = platforms.linux;
    license = licenses.mit;
  };
}