{ lib, stdenv, go, fetchurl, redo-apenwarr, curl, perl, genericUpdater , writeShellScript, nixosTests, cfgPath ? "/etc/nncp.hjson" }: stdenv.mkDerivation rec { pname = "nncp"; version = "8.5.0"; outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; sha256 = "sha256-6IUNJ3DE+nRc+bmpDO7l1gXlD6UDGggTSYRMFT57v/Q="; }; 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.]+)