summary refs log blame commit diff
path: root/pkgs/os-specific/linux/tcp-wrappers/default.nix
blob: 105a4cacd8266fdd720777eca23a20999193a553 (plain) (tree)
1
2
3
4
5
6
7
8
9

                     


                                   
 
                  

                                                                                         
    
 



                                                                                              
 
               


                                                       

     
                                                       

                   

                                                                






                                    





                                
 














                                                                                  
                          
                                          
    
 
{ fetchurl, stdenv }:

stdenv.mkDerivation rec {
  name = "tcp-wrappers-${version}";
  version = "7.6.q";

  src = fetchurl {
    url = "mirror://debian/pool/main/t/tcp-wrappers/tcp-wrappers_${version}.orig.tar.gz";
    sha256 = "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm";
  };

  debian = fetchurl {
    url = "mirror://debian/pool/main/t/tcp-wrappers/tcp-wrappers_${version}-24.debian.tar.xz";
    sha256 = "1kgax35rwaj5q8nf8fw60aczvxj99h2jjp7iv1f82y85yz9x0ak7";
  };

  prePatch = ''
    tar -xaf $debian
    shopt -s extglob
    patches="$(echo debian/patches/!(series)) $patches"
  '';

  makeFlags = [ "REAL_DAEMON_DIR=$(out)/bin" "linux" ];

  installPhase = ''
    mkdir -p "$out/bin"
    cp -v safe_finger tcpd tcpdchk tcpdmatch try-from "$out/bin"

    mkdir -p "$out/lib"
    cp -v shared/lib*.so* "$out/lib"

    mkdir -p "$out/include"
    cp -v *.h "$out/include"

    for i in 3 5 8;
    do
      mkdir -p "$out/man/man$i"
      cp *.$i "$out/man/man$i" ;
    done
  '';

  meta = {
    description = "TCP Wrappers, a network logger, also known as TCPD or LOG_TCP";

    longDescription = ''
      Wietse Venema's network logger, also known as TCPD or LOG_TCP.
      These programs log the client host name of incoming telnet, ftp,
      rsh, rlogin, finger etc. requests.  Security options are: access
      control per host, domain and/or service; detection of host name
      spoofing or host address spoofing; booby traps to implement an
      early-warning system.  The current version supports the System
      V.4 TLI network programming interface (Solaris, DG/UX) in
      addition to the traditional BSD sockets.
    '';

    homepage = ftp://ftp.porcupine.org/pub/security/index.html;
    license = "BSD-style";
    platforms = stdenv.lib.platforms.unix;
  };
}