summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/eg/eggdrop/package.nix
blob: c60f64f0fc702a53dc4b0246ff20fd9be00e6f54 (plain)
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
44
45
46
{
  lib,
  stdenv,
  fetchurl,
  openssl,
  tcl,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "eggdrop";
  version = "1.10.2";

  src = fetchurl {
    url = "https://ftp.eggheads.org/pub/eggdrop/source/${lib.versions.majorMinor finalAttrs.version}/eggdrop-${finalAttrs.version}.tar.gz";
    hash = "sha256-1mRrYwh54azZsFP/oS9GZn+QcUXymvHfD4J0nvMDKpQ=";
  };

  buildInputs = [
    openssl
    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 = {
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.unix;
    homepage = "https://www.eggheads.org";
    description = "Internet Relay Chat (IRC) bot";
    maintainers = with lib.maintainers; [ EpicEric ];
  };
})