{ lib, stdenv, go, fetchurl, redo-apenwarr, curl, perl, genericUpdater , writeShellScript, nixosTests, cfgPath ? "/etc/nncp.hjson" }: stdenv.mkDerivation rec { pname = "nncp"; version = "8.8.0"; outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; sha256 = "829E2FB2F1EED8AF7ACE4554405E56F0341BE2A01C234A34D01122382AA0794C"; }; nativeBuildInputs = [ go redo-apenwarr ]; # Build parameters CFGPATH = cfgPath; SENDMAIL = "sendmail"; preConfigure = "export GOCACHE=$NIX_BUILD_TOP/gocache"; installPhase = '' runHook preInstall export PREFIX=$out rm -f INSTALL # work around case insensitivity redo install runHook postInstall ''; enableParallelBuilding = true; passthru.updateScript = genericUpdater { versionLister = writeShellScript "nncp-versionLister" '' ${curl}/bin/curl -s ${meta.downloadPage} | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)