Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-07-01 06:01:03 +00:00 committed by GitHub
commit 9ae4f4c991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 405 additions and 65 deletions

View file

@ -231,9 +231,9 @@ in {
}
fi
'' + optionalString cfg.autoMount ''
ipfs --local config Mounts.FuseAllowOther --json true
ipfs --local config Mounts.IPFS ${cfg.ipfsMountDir}
ipfs --local config Mounts.IPNS ${cfg.ipnsMountDir}
ipfs --offline config Mounts.FuseAllowOther --json true
ipfs --offline config Mounts.IPFS ${cfg.ipfsMountDir}
ipfs --offline config Mounts.IPNS ${cfg.ipnsMountDir}
'' + concatStringsSep "\n" (collect
isString
(mapAttrsRecursive
@ -243,7 +243,7 @@ in {
read value <<EOF
${builtins.toJSON value}
EOF
ipfs --local config --json "${concatStringsSep "." path}" "$value"
ipfs --offline config --json "${concatStringsSep "." path}" "$value"
'')
({ Addresses.API = cfg.apiAddress;
Addresses.Gateway = cfg.gatewayAddress;

View file

@ -19,6 +19,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
machine.wait_for_unit("vault.service")
machine.wait_for_open_port(8200)
machine.succeed("vault operator init")
machine.succeed("vault status | grep Sealed | grep true")
# vault now returns exit code 2 for sealed vaults
machine.fail("vault status")
machine.succeed("vault status || test $? -eq 2")
'';
})

View file

@ -15,7 +15,7 @@ appimageTools.wrapType2 {
url = "https://repo2.timedoctor.com/td-desktop-hybrid/prod/v${version}/timedoctor-desktop_${version}_linux-x86_64.AppImage";
};
multiPkgs = _: with _; [
alsaLib
alsa-lib
atk
at-spi2-atk
at-spi2-core

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "gh";
version = "1.12.0";
version = "1.12.1";
src = fetchFromGitHub {
owner = "cli";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-b0pbcRcdfkHrqlALHcUzmVujkeKNFHdWd3ENPXZ5WYk=";
sha256 = "sha256-P9fbkJSXRYZdVD1EKWWs0FKs8aQdPqHWESUqjsGgyPU=";
};
vendorSha256 = "sha256-ndsjmY/UCFyegm8yP7BopYMh5eZ8/fftWfxW4r5los0=";

View file

@ -3,13 +3,9 @@
libsigcxx, libxmlxx, xdg-utils, isocodes, wrapGAppsHook
}:
let
version = "0.54.0";
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "subtitleeditor";
inherit version;
version = "0.54.0";
src = fetchFromGitHub {
owner = "kitone";

View file

@ -614,6 +614,7 @@ in with py.pkgs; buildPythonApplication rec {
"pushbullet"
"pvpc_hourly_pricing"
"python_script"
"qld_bushfire"
"rachio"
"radarr"
"rainmachine"

View file

@ -0,0 +1,59 @@
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, pkgs
, stdenv
, fetchzip
, openjdk16
, nodejs
, pathDeps ? [ ]
}:
buildGoModule rec {
pname = "pufferpanel";
version = "2.2.0";
src = fetchFromGitHub {
owner = "pufferpanel";
repo = pname;
rev = "v${version}";
sha256 = "1ifig8ckjlg47wj0lfk4q941dan7llb1i5l76akcpjq726b2j8lh";
};
# PufferPanel is split into two parts: the backend daemon and the
# frontend.
# Getting the frontend to build in the Nix environment fails even
# with all the proper node_modules populated. To work around this,
# we just download the built frontend and package that.
frontend = fetchzip {
url = "https://github.com/PufferPanel/PufferPanel/releases/download/v${version}/pufferpanel_${version}_linux_arm64.zip";
sha256 = "0phbf4asr0dns7if84crx05kfgr44yaxrbsbihdywbhh2mb16052";
stripRoot = false;
} + "/www";
nativeBuildInputs = [ makeWrapper ];
vendorSha256 = "061l1sy0z3kd7rc2blqh333gy66nbadfxy9hyxgq07dszds4byys";
postFixup = ''
mkdir -p $out/share/pufferpanel
cp -r ${src}/assets/email $out/share/pufferpanel/templates
cp -r ${frontend} $out/share/pufferpanel/www
# Wrap the binary with the path to the external files.
mv $out/bin/cmd $out/bin/pufferpanel
wrapProgram "$out/bin/pufferpanel" \
--set PUFFER_PANEL_EMAIL_TEMPLATES $out/share/pufferpanel/templates/emails.json \
--set GIN_MODE release \
--set PUFFER_PANEL_WEB_FILES $out/share/pufferpanel/www \
--prefix PATH : ${lib.makeBinPath pathDeps}
'';
meta = with lib; {
description = "A free, open source game management panel";
homepage = "https://www.pufferpanel.com/";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ ronthecookie ];
};
}

View file

@ -0,0 +1,87 @@
{ lib, stdenv, fetchFromGitHub, fetchurl, linkFarmFromDrvs, makeWrapper, autoPatchelfHook
, dotnet-sdk_5, dotnetPackages, dotnetCorePackages, cacert
}:
let
projectFile = "DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj";
in
stdenv.mkDerivation rec {
pname = "discordchatexporter-cli";
version = "2.28";
src = fetchFromGitHub {
owner = "tyrrrz";
repo = "discordchatexporter";
rev = version;
sha256 = "1bcq8mwjr8635g8mkgbxnszk20hnwf0zk672glrxjqga6f6fnykg";
};
nativeBuildInputs = [ dotnet-sdk_5 dotnetPackages.Nuget cacert makeWrapper autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
nugetDeps = linkFarmFromDrvs "${pname}-nuget-deps" (import ./deps.nix {
fetchNuGet = { name, version, sha256 }: fetchurl {
name = "nuget-${name}-${version}.nupkg";
url = "https://www.nuget.org/api/v2/package/${name}/${version}";
inherit sha256;
};
});
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_NOLOGO=1
nuget sources Add -Name nixos -Source "$PWD/nixos"
nuget init "$nugetDeps" "$PWD/nixos"
# FIXME: https://github.com/NuGet/Home/issues/4413
mkdir -p $HOME/.nuget/NuGet
cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet
dotnet restore --source "$PWD/nixos" ${projectFile}
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
dotnet build ${projectFile} \
--no-restore \
--configuration Release \
-p:Version=${version}
runHook postBuild
'';
installPhase = ''
runHook preInstall
dotnet publish ${projectFile} \
--no-build \
--configuration Release \
--no-self-contained \
--output $out/lib/${pname}
shopt -s extglob
makeWrapper $out/lib/${pname}/DiscordChatExporter.Cli $out/bin/discordchatexporter-cli \
--set DOTNET_ROOT "${dotnetCorePackages.sdk_3_1}"
runHook postInstall
'';
# Strip breaks the executable.
dontStrip = true;
meta = with lib; {
description = "A tool to export Discord chat logs to a file";
homepage = "https://github.com/Tyrrrz/DiscordChatExporter";
license = licenses.gpl3Plus;
maintainers = [ maintainers.ivar ];
platforms = [ "x86_64-linux" ];
};
passthru.updateScript = ./updater.sh;
}

View file

@ -0,0 +1,67 @@
{ fetchNuGet }: [
(fetchNuGet {
name = "CliFx";
version = "2.0.4";
sha256 = "1wwpjli4y2545yi6k17mvjqy994wl3wm6nngszk87rbdwhkbncaj";
})
(fetchNuGet {
name = "Gress";
version = "1.2.0";
sha256 = "0aidc9whi0718gh896j7xkyndki9x7rifd8n1n681afb2zbxw4bn";
})
(fetchNuGet {
name = "JsonExtensions";
version = "1.1.0";
sha256 = "1fqxb2jdbvjgg135wmy890qf63r056dq16jy7wgzkgp21m3j0lgy";
})
(fetchNuGet {
name = "Microsoft.AspNetCore.App.Ref";
version = "3.1.10";
sha256 = "0xn4zh7shvijqlr03fqsmps6gz856isd9bg9rk4z2c4599ggal77";
})
(fetchNuGet {
name = "Microsoft.NETCore.App.Host.linux-x64";
version = "3.1.14";
sha256 = "11rqnascx9asfyxgxzwgxgr9gxxndm552k4dn4p1s57ciz7vkg9h";
})
(fetchNuGet {
name = "Microsoft.NETCore.App.Ref";
version = "3.1.0";
sha256 = "08svsiilx9spvjamcnjswv0dlpdrgryhr3asdz7cvnl914gjzq4y";
})
(fetchNuGet {
name = "MiniRazor.CodeGen";
version = "2.1.2";
sha256 = "0mg4zy4zq0ccrc9wchy796ln1znkmn3k1aax0kd2gha4fwa1d1fb";
})
(fetchNuGet {
name = "MiniRazor.Runtime";
version = "2.1.2";
sha256 = "1a6cm7j1f5n1bfzhg8w60xwa7cps2i82418k57dm2hgqla6p3rsp";
})
(fetchNuGet {
name = "Polly";
version = "7.2.2";
sha256 = "0s15n5zwj44i6sw3v40ca8l6j0ijydxcakvad49j52rp49iwrmkn";
})
(fetchNuGet {
name = "Spectre.Console";
version = "0.40.0";
sha256 = "17bb31nsvfk7m337zwqcz4v6cvayhfx51ri4yrv5i8nbp7f4rpb1";
})
(fetchNuGet {
name = "System.Memory";
version = "4.5.0";
sha256 = "1layqpcx1q4l805fdnj2dfqp6ncx2z42ca06rgsr6ikq4jjgbv30";
})
(fetchNuGet {
name = "Tyrrrz.Extensions";
version = "1.6.5";
sha256 = "1yzsii1pbp6b066wxwwws310p7h809apl81bhb8ad55hqlzy1rg3";
})
(fetchNuGet {
name = "Wcwidth";
version = "0.2.0";
sha256 = "0p7zaisix9ql4v5nyl9gfc93xcyj74j01rwvgm7jw29js3wlj10s";
})
]

View file

@ -0,0 +1,44 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts dotnet-sdk_5
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
deps_file="$(realpath "./deps.nix")"
new_version="$(curl -s "https://api.github.com/repos/tyrrrz/DiscordChatExporter/releases?per_page=1" | jq -r '.[0].name')"
old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
if [[ "$new_version" == "$old_version" ]]; then
echo "Up to date"
exit 0
fi
cd ../../../..
update-source-version discordchatexporter-cli "$new_version"
store_src="$(nix-build . -A discordchatexporter-cli.src --no-out-link)"
src="$(mktemp -d /tmp/discordexporter-src.XXX)"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
pushd "$src"
mkdir ./nuget_tmp.packages
dotnet restore DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj --packages ./nuget_tmp.packages
echo "{ fetchNuGet }: [" >"$deps_file"
while read pkg_spec; do
{ read pkg_name; read pkg_version; } < <(
# Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3`
sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
cat >>"$deps_file" <<EOF
(fetchNuGet {
name = "$pkg_name";
version = "$pkg_version";
sha256 = "$pkg_sha256";
})
EOF
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
echo "]" >>"$deps_file"
popd
rm -r "$src"

View file

@ -1,33 +0,0 @@
source $stdenv/setup
preBuild() {
cd src
}
preInstall() {
mkdir -p $out/bin
}
postInstall() {
# Install the "prefabs".
mkdir -p $out/share/ploticus/prefabs && \
cd .. && \
cp -rv prefabs/* $out/share/ploticus/prefabs
# Create a wrapper that knows where to find them. Debian's package
# does something similar by patching directly the C file that looks
# for `$PLOTICUS_PREFABS'.
cat > $out/bin/ploticus <<EOF
#! $SHELL -e
PLOTICUS_PREFABS="$out/share/ploticus/prefabs"
export PLOTICUS_PREFABS
exec "$out/bin/pl" \$@
EOF
chmod +x $out/bin/ploticus
# Install the man pages.
cp -rv man $out
ln -s "$out/man/man1/pl.1" "$out/man/man1/ploticus.1"
}
genericBuild

View file

@ -1,34 +1,74 @@
{lib, stdenv, fetchurl, zlib, libX11, libpng}:
{ lib
, stdenv
, fetchurl
, zlib
, libX11
, libpng
, gd
, freetype
}:
stdenv.mkDerivation {
name = "ploticus-2.42";
stdenv.mkDerivation rec {
pname = "ploticus";
version = "2.42";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://sourceforge/ploticus/ploticus/2.41/pl241src.tar.gz";
sha256 = "1065r0nizjixi9sxxfxrnwg10r458i6fgsd23nrxa200rypvdk7c";
url = "mirror://sourceforge/ploticus/ploticus/${version}/ploticus${lib.replaceStrings [ "." ] [ "" ] version}_src.tar.gz";
sha256 = "PynkufQFIDqT7+yQDlgW2eG0OBghiB4kHAjKt91m4LA=";
};
buildInputs = [ zlib libX11 libpng ];
patches = [
# Replace hardcoded FHS path with $out.
./ploticus-install.patch
# Set the location of the PREFABS directory.
./set-prefabs-dir.patch
# Use gd from Nixpkgs instead of the vendored one.
# This is required for non-ASCII fonts to work:
# http://ploticus.sourceforge.net/doc/fonts.html
./use-gd-package.patch
];
buildInputs = [
zlib
libX11
libpng
gd
freetype
];
hardeningDisable = [ "format" ];
patches = [ ./ploticus-install.patch ];
preBuild = ''
cd src
'';
# Make the symlink relative instead of absolute.
# Otherwise it breaks when auto-moved to $out/share.
preFixup = ''
ln -sf pl.1 "$out"/man/man1/ploticus.1
preInstall = ''
mkdir -p "$out/bin"
'';
postInstall = ''
cd ..
# Install the “prefabs”.
mkdir -p "$out/share/ploticus/prefabs"
cp -rv prefabs/* "$out/share/ploticus/prefabs"
# Add aliases for backwards compatibility.
ln -s "pl" "$out/bin/ploticus"
'';
meta = with lib; {
description = "A non-interactive software package for producing plots and charts";
longDescription = ''Ploticus is a free, GPL'd, non-interactive
longDescription = ''
Ploticus is a free, GPL'd, non-interactive
software package for producing plots, charts, and graphics from
data. Ploticus is good for automated or just-in-time graph
generation, handles date and time data nicely, and has basic
statistical capabilities. It allows significant user control
over colors, styles, options and details.'';
over colors, styles, options and details.
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ pSub ];
homepage = "http://ploticus.sourceforge.net/";

View file

@ -0,0 +1,11 @@
--- a/src/pl.h
+++ b/src/pl.h
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include "plg.h"
-#define PREFABS_DIR "" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */
+#define PREFABS_DIR "@out@/share/ploticus/prefabs" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */
#define PLVERSION "2.42-May2013" /* see also the Copyright page, and page headers and footers */

View file

@ -0,0 +1,34 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -91,10 +91,10 @@
########### Option 1: use bundled GD16 (PNG only). Requires libpng and zlib.
-exetarget: plpng
-GD16LIBS = -lpng -lz
-GD16H = -I/usr/local/include
-ZFLAG = -DWZ
+# exetarget: plpng
+# GD16LIBS = -lpng -lz
+# GD16H = -I/usr/local/include
+# ZFLAG = -DWZ
### These should remain commented unless your libs are not in usual places, then alter to suit...
### GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a
### GD16H = -I/home/scg/lib
@@ -111,11 +111,11 @@
########### Option 4: use your own GD resource with FreeType2 (ttf) fonts enabled.
########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype
-# exetarget: plgd18
-# GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype
-# GD18H =
-# GDFREETYPE = -DGDFREETYPE
-# ZFLAG = -DWZ
+exetarget: plgd18
+GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype
+GD18H =
+GDFREETYPE = -DGDFREETYPE
+ZFLAG = -DWZ
########### Option 5: don't use GD at all.
# exetarget: plnogd

View file

@ -1,4 +1,8 @@
{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests }:
{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests
, makeWrapper
, gawk
, glibc
}:
buildGoPackage rec {
pname = "vault";
@ -15,13 +19,16 @@ buildGoPackage rec {
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [ installShellFiles makeWrapper ];
buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ];
postInstall = ''
echo "complete -C $out/bin/vault vault" > vault.bash
installShellCompletion vault.bash
wrapProgram $out/bin/vault \
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
'';
passthru.tests.vault = nixosTests.vault;

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, unzip }:
{ lib, stdenv, fetchurl, unzip, makeWrapper, gawk, glibc }:
let
version = "1.7.3";
@ -30,7 +30,7 @@ in stdenv.mkDerivation {
src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
nativeBuildInputs = [ unzip ];
nativeBuildInputs = [ makeWrapper unzip ];
sourceRoot = ".";
@ -41,6 +41,9 @@ in stdenv.mkDerivation {
mv vault $out/bin
echo "complete -C $out/bin/vault vault" > $out/share/bash-completion/completions/vault
wrapProgram $out/bin/vault \
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
runHook postInstall
'';

View file

@ -42,6 +42,11 @@ in stdenv.mkDerivation rec {
# required to prevent plugins from relying on /etc
# and /var
./no-files-in-etc-and-var.patch
# The current IPC location is unsafe as it writes
# a fixed path in /tmp, which is world-writable.
# Therefore we put it into `/run/netdata`, which is owned
# by netdata only.
./ipc-socket-in-run.patch
];
NIX_CFLAGS_COMPILE = optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1";

View file

@ -0,0 +1,13 @@
diff --git a/daemon/commands.h b/daemon/commands.h
index bd4aabfe1cbe4..ce7eb3c730228 100644
--- a/daemon/commands.h
+++ b/daemon/commands.h
@@ -6,7 +6,7 @@
#ifdef _WIN32
# define PIPENAME "\\\\?\\pipe\\netdata-cli"
#else
-# define PIPENAME "/tmp/netdata-ipc"
+# define PIPENAME "/run/netdata/ipc"
#endif
#define MAX_COMMAND_LENGTH 4096

View file

@ -14852,6 +14852,8 @@ in
directfb = callPackage ../development/libraries/directfb { };
discordchatexporter-cli = callPackage ../tools/backup/discordchatexporter-cli { };
discord-rpc = callPackage ../development/libraries/discord-rpc {
inherit (darwin.apple_sdk.frameworks) AppKit;
};
@ -17832,6 +17834,8 @@ in
pstreams = callPackage ../development/libraries/pstreams {};
pufferpanel = callPackage ../servers/pufferpanel { };
pugixml = callPackage ../development/libraries/pugixml { };
pylode = callPackage ../misc/pylode {};