summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/silc-client/default.nix
blob: 417cb4dbb8445df594a045c662e72ca64a627ac2 (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
{ lib, stdenv, fetchurl, perl, pkg-config, glib, ncurses
, enablePlugin ? false }:

# Enabling the plugin and using it with a recent irssi, segafults on join:
# http://marc.info/?l=silc-devel&m=125610477802211

stdenv.mkDerivation rec {
  pname = "silc-client" + lib.optionalString enablePlugin "-irssi-plugin";
  version = "1.1.11";

  src = fetchurl {
    url = "mirror://sourceforge/silc/silc/client/sources/silc-client-${version}.tar.bz2";
    sha256 = "13cp3fmdnj8scjak0d2xal3bfvs2k7ssrwdhp0zl6jar5rwc7prn";
  };

  enableParallelBuilding = true;

  dontDisableStatic = true;

  hardeningDisable = [ "format" ];

  configureFlags = [ "--with-ncurses=${ncurses.dev}" ];

  preConfigure = lib.optionalString enablePlugin ''
    configureFlags="$configureFlags --with-silc-plugin=$out/lib/irssi"
  '';

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ perl glib ncurses ];

  meta = {
    homepage = "http://silcnet.org/";
    description = "Secure Internet Live Conferencing server";
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [viric];
    platforms = with lib.platforms; linux;
  };
}