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