From 2d4524eb8cfc0d554d281fd932ff264d2c114f9e Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 18 Dec 2021 09:52:01 +0000 Subject: [PATCH] nncp: 7.7.0 -> 8.0.2 This update introduces an encrypted packet format that is incompatible with releases older than 8.0.0. --- pkgs/tools/misc/nncp/default.nix | 34 ++++++++++++-------------------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/pkgs/tools/misc/nncp/default.nix b/pkgs/tools/misc/nncp/default.nix index 1a20c412edba..8470837278b0 100644 --- a/pkgs/tools/misc/nncp/default.nix +++ b/pkgs/tools/misc/nncp/default.nix @@ -1,32 +1,23 @@ -{ lib, stdenv -, go -, fetchurl -, redo-apenwarr -, curl -, perl -, genericUpdater -, writeShellScript -}: +{ lib, stdenv, go, fetchurl, redo-apenwarr, curl, perl, genericUpdater +, writeShellScript, nixosTests, cfgPath ? "/etc/nncp.hjson" }: stdenv.mkDerivation rec { pname = "nncp"; - version = "7.7.0"; + version = "8.0.2"; + outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; - sha256 = "ppKi/JY8sKRb/Vt/SXom0L1zhjBPn6PNUm3Gn8o5Ke4="; + sha256 = "sha256-hMb7bAdk3xFcUe5CTu9LnIR3VSJDUKbMSE86s8d5udM="; }; nativeBuildInputs = [ go redo-apenwarr ]; - buildPhase = '' - runHook preBuild - export GOCACHE=$PWD/.cache - export CFGPATH=/etc/nncp.hjson - export SENDMAIL=sendmail # default value for generated config file - redo ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES}} - runHook postBuild - ''; + # Build parameters + CFGPATH = cfgPath; + SENDMAIL = "sendmail"; + + preConfigure = "export GOCACHE=$NIX_BUILD_TOP/gocache"; installPhase = '' runHook preInstall @@ -42,7 +33,7 @@ stdenv.mkDerivation rec { 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.]+)([0-9.]+)