{ cfgPath ? "/etc/nncp.hjson", curl, fetchurl, lib, genericUpdater, go, perl, stdenv, writeShellScript, }: stdenv.mkDerivation (finalAttrs: { pname = "nncp"; version = "8.12.1"; outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/nncp-${finalAttrs.version}.tar.xz"; hash = "sha256-yTwndQ43aBCned7iKPZm70zCC3zMapf2GXtornjiZos="; }; nativeBuildInputs = [ go ]; # Build parameters CFGPATH = cfgPath; SENDMAIL = "sendmail"; preConfigure = "export GOCACHE=$NIX_BUILD_TOP/gocache"; buildPhase = '' runHook preBuild ./build runHook postBuild ''; installPhase = '' runHook preInstall PREFIX=$out ./install runHook postInstall ''; enableParallelBuilding = true; passthru.updateScript = genericUpdater { versionLister = writeShellScript "nncp-versionLister" '' ${curl}/bin/curl -s ${finalAttrs.meta.downloadPage} | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)