about summary refs log tree commit diff
path: root/pkgs/tools/networking/eggdrop/default.nix
blob: fad18ce2213f3f53441bb030b160b1a8c029d30e (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
{ lib, stdenv, fetchurl, tcl }:

stdenv.mkDerivation rec {
  pname = "eggdrop";
  version = "1.9.5";

  src = fetchurl {
    url = "https://ftp.eggheads.org/pub/eggdrop/source/${lib.versions.majorMinor version}/eggdrop-${version}.tar.gz";
    hash = "sha256-4mkY6opk2YV1ecW2DGYaM38gdz7dgwhrNWUlvrWBc2o=";
  };

  buildInputs = [ tcl ];

  hardeningDisable = [ "format" ];

  preConfigure = ''
    prefix=$out/eggdrop
    mkdir -p $prefix
  '';

  postConfigure = ''
    make config
  '';

  configureFlags = [
    "--with-tcllib=${tcl}/lib/lib${tcl.libPrefix}${stdenv.hostPlatform.extensions.sharedLibrary}"
    "--with-tclinc=${tcl}/include/tcl.h"
  ];

  meta = with lib; {
    license = licenses.gpl2Plus;
    platforms = platforms.unix;
    homepage = "https://www.eggheads.org";
    description = "An Internet Relay Chat (IRC) bot";
  };
}