Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 11, 2020
2 parents 5448578 + 614876e commit 0d0d05f
Show file tree
Hide file tree
Showing 21 changed files with 209 additions and 163 deletions.
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/prometheus/exporters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ let
"openvpn"
"postfix"
"postgres"
"py-air-control"
"redis"
"rspamd"
"rtl_433"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{ config, lib, pkgs, options }:

with lib;

let
cfg = config.services.prometheus.exporters.py-air-control;

py-air-control-exporter-env = pkgs.python3.withPackages (pyPkgs: [
pyPkgs.py-air-control-exporter
]);

workingDir = "/var/lib/${cfg.stateDir}";

in
{
port = 9896;
extraOpts = {
deviceHostname = mkOption {
type = types.str;
example = "192.168.1.123";
description = ''
The hostname of the air purification device from which to scrape the metrics.
'';
};
protocol = mkOption {
type = types.str;
default = "http";
description = ''
The protocol to use when communicating with the air purification device.
Available: [http, coap, plain_coap]
'';
};
stateDir = mkOption {
type = types.str;
default = "prometheus-py-air-control-exporter";
description = ''
Directory below <literal>/var/lib</literal> to store runtime data.
This directory will be created automatically using systemd's StateDirectory mechanism.
'';
};
};
serviceOpts = {
serviceConfig = {
DynamicUser = false;
StateDirectory = cfg.stateDir;
WorkingDirectory = workingDir;
ExecStart = ''
${py-air-control-exporter-env}/bin/python -c \
"from py_air_control_exporter import app; app.create_app().run( \
debug=False, \
port=${toString cfg.port}, \
host='${cfg.listenAddress}', \
)"
'';
Environment = [
"PY_AIR_CONTROL_HOST=${cfg.deviceHostname}"
"PY_AIR_CONTROL_PROTOCOL=${cfg.protocol}"
"HOME=${workingDir}"
];
};
};
}
23 changes: 17 additions & 6 deletions nixos/modules/services/web-servers/nginx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,24 @@ in
};

config = mkOption {
type = types.str;
default = "";
description = "
Verbatim nginx.conf configuration.
This is mutually exclusive with the structured configuration
via virtualHosts and the recommendedXyzSettings configuration
options. See appendConfig for appending to the generated http block.
";
description = ''
Verbatim <filename>nginx.conf</filename> configuration.
This is mutually exclusive to any other config option for
<filename>nginx.conf</filename> except for
<itemizedlist>
<listitem><para><xref linkend="opt-services.nginx.appendConfig" />
</para></listitem>
<listitem><para><xref linkend="opt-services.nginx.httpConfig" />
</para></listitem>
<listitem><para><xref linkend="opt-services.nginx.logError" />
</para></listitem>
</itemizedlist>
If additional verbatim config in addition to other options is needed,
<xref linkend="opt-services.nginx.appendConfig" /> should be used instead.
'';
};

appendConfig = mkOption {
Expand Down
15 changes: 15 additions & 0 deletions nixos/tests/prometheus-exporters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,21 @@ let
'';
};

py-air-control = {
nodeName = "py_air_control";
exporterConfig = {
enable = true;
deviceHostname = "127.0.0.1";
};
exporterTest = ''
wait_for_unit("prometheus-py-air-control-exporter.service")
wait_for_open_port(9896)
succeed(
"curl -sSf http://localhost:9896/metrics | grep -q 'py_air_control_sampling_error_total'"
)
'';
};

redis = {
exporterConfig = {
enable = true;
Expand Down
21 changes: 15 additions & 6 deletions pkgs/applications/editors/emacs-modes/melpa-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ let
(attrs.nativeBuildInputs or [ ]) ++ [ external.git ];
});

magit-stgit = super.magit-stgit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or [ ]) ++ [ external.git ];
});

magit-tbdiff = super.magit-tbdiff.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
Expand Down Expand Up @@ -426,21 +420,36 @@ let
# upstream issue: missing file header
initsplit = markBroken super.initsplit;

# upstream issue: missing file header
instapaper = markBroken super.instapaper;

# upstream issue: missing file header
jsfmt = markBroken super.jsfmt;

# upstream issue: missing file header
maxframe = markBroken super.maxframe;

# upstream issue: doesn't build
magit-stgit = markBroken super.magit-stgit;

# upstream issue: missing file header
melancholy-theme = markBroken super.melancholy-theme;

# upstream issue: doesn't build
eterm-256color = markBroken super.eterm-256color;

# upstream issue: doesn't build
per-buffer-theme = markBroken super.per-buffer-theme;

# upstream issue: missing file header
qiita = markBroken super.qiita;

# upstream issue: missing file header
speech-tagger = markBroken super.speech-tagger;

# upstream issue: missing file header
sql-presto = markBroken super.sql-presto;

# upstream issue: missing file header
textmate = markBroken super.textmate;

Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/editors/emacs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ in stdenv.mkDerivation {
siteVersionDir=`ls $out/share/emacs | grep -v site-lisp | head -n 1`
rm -rf $out/var
rm -rf $siteVersionDir
rm -r $out/share/emacs/$siteVersionDir/site-lisp
'' + lib.optionalString withCsrc ''
for srcdir in src lisp lwlib ; do
dstdir=$out/share/emacs/$siteVersionDir/$srcdir
Expand Down
11 changes: 11 additions & 0 deletions pkgs/applications/editors/emacs/site-start.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ least specific (the system profile)"
(nix--profile-paths)))))
(setq load-path (append paths load-path)))

;;; Remove wrapper site-lisp from EMACSLOADPATH so it's not propagated
;;; to any other Emacsen that might be started as subprocesses.
(let ((wrapper-site-lisp (getenv "emacsWithPackages_siteLisp"))
(env-load-path (getenv "EMACSLOADPATH")))
(when wrapper-site-lisp
(setenv "emacsWithPackages_siteLisp" nil))
(when (and wrapper-site-lisp env-load-path)
(let* ((env-list (split-string env-load-path ":"))
(new-env-list (delete wrapper-site-lisp env-list)))
(setenv "EMACSLOADPATH" (when new-env-list
(mapconcat 'identity new-env-list ":"))))))

;;; Make `woman' find the man pages
(defvar woman-manpath)
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/istioctl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

buildGoModule rec {
pname = "istioctl";
version = "1.8.0";
version = "1.8.1";

src = fetchFromGitHub {
owner = "istio";
repo = "istio";
rev = version;
sha256 = "0fwc56797gmcg9pcy0jpv5lb0b6wwiqh242xn1chd4a4hp8in7h9";
sha256 = "1m97hszmw0hfzj3jvd1is7fa3mpqkm7jbq3ik337rb9yq1f0gasv";
};
vendorSha256 = "0ing5pih2rz974dcianlb05fpgrj3y7h32awf3cp41gh448gxd24";
vendorSha256 = "0ividxxmil69vpvyjlgyzb2jzipmh9rpvk19kv7266d29ky3q7s6";

doCheck = false;

Expand Down
118 changes: 0 additions & 118 deletions pkgs/applications/video/bomi/default.nix

This file was deleted.

11 changes: 11 additions & 0 deletions pkgs/build-support/emacs/elpa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ with lib;
{ pname
, version
, src
, meta ? {}
, ...
}@args:

let

defaultMeta = {
homepage = args.src.meta.homepage or "https://elpa.gnu.org/packages/${pname}.html";
};

in

import ./generic.nix { inherit lib stdenv emacs texinfo; } ({

phases = "installPhase fixupPhase distPhase";
Expand All @@ -23,6 +32,8 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
runHook postInstall
'';

meta = defaultMeta // meta;
}

// removeAttrs args [ "files" "fileSpecs"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/emacs/melpa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ with lib;
let

defaultMeta = {
homepage = args.src.meta.homepage or "http://melpa.org/#/${pname}";
homepage = args.src.meta.homepage or "https://melpa.org/#/${pname}";
};

in
Expand Down
Loading

0 comments on commit 0d0d05f

Please sign in to comment.