anchor.diff:  { stdenv, fetchurl, ncurses }:
  +
  +let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
   
   stdenv.mkDerivation rec {
     name = "lsof-${version}";
  
positive.code:   };
  
    unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
   
    patches = [ ./dfile.patch ];
  
    configurePhase = ''
      # Stop build scripts from searching global include paths
      export LSOF_INCLUDE=${stdenv.cc.libc}/include
      ./Configure -n ${if stdenv.isDarwin then "darwin" else "linux"}
    '';
    
    preBuild = ''
      sed -i Makefile -e 's/^CFGF=/&	-DHASIPv6=1/;' -e 's/-lcurses/-lncurses/'
    '';
  
  
    installPhase = ''
      mkdir -p $out/bin $out/man/man8
  
negative.code:       from it).
      '';
      maintainers = [ stdenv.lib.maintainers.mornfall ];
      platforms = stdenv.lib.platforms.unix;
    };
  }
  