From 31ae9dd6abb93681b7b3683c7a92fac5ead8f552 Mon Sep 17 00:00:00 2001 From: Frank Doepper Date: Mon, 16 Dec 2019 18:19:28 +0100 Subject: [PATCH] nncp: init at 5.3.3 --- pkgs/tools/misc/nncp/default.nix | 61 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 63 insertions(+) create mode 100644 pkgs/tools/misc/nncp/default.nix diff --git a/pkgs/tools/misc/nncp/default.nix b/pkgs/tools/misc/nncp/default.nix new file mode 100644 index 000000000000..3322ed0c8a46 --- /dev/null +++ b/pkgs/tools/misc/nncp/default.nix @@ -0,0 +1,61 @@ +{ stdenv +, go +, fetchurl +, curl +, perl +, genericUpdater +, writeShellScript +}: + +stdenv.mkDerivation rec { + pname = "nncp"; + version = "5.3.3"; + + src = fetchurl { + url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; + sha256 = "1l35ndzrvpfim29jn1p0bwmc8w892z44nsrdnay28k229r9dhz3h"; + }; + + nativeBuildInputs = [ go ]; + + preConfigure = '' + export GOCACHE=$PWD/.cache + ''; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "CFGPATH=/etc/nncp.hjson" + "SENDMAIL=/run/wrappers/bin/sendmail" + ]; + + passthru.updateScript = genericUpdater { + inherit pname version; + versionLister = writeShellScript "nncp-versionLister" '' + echo "# Versions for $1:" >> "$2" + ${curl}/bin/curl -s http://www.nncpgo.org/Tarballs.html | ${perl}/bin/perl -lne 'print $1 if /Release.*>([0-9.]+)