{ lib, stdenv, go, fetchurl, redo-apenwarr, curl, perl, genericUpdater , writeShellScript, nixosTests, cfgPath ? "/etc/nncp.hjson" }: stdenv.mkDerivation rec { pname = "nncp"; version = "8.0.2"; outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; sha256 = "sha256-hMb7bAdk3xFcUe5CTu9LnIR3VSJDUKbMSE86s8d5udM="; }; 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 { inherit pname version; versionLister = writeShellScript "nncp-versionLister" '' echo "# Versions for $1:" >> "$2" ${curl}/bin/curl -s ${meta.downloadPage} | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)