Skip to content

Commit 689d630

Browse files
committedDec 5, 2017
Merge branch 'master' into staging
The haskell split got reverted (again). Hydra: ?compare=1416012
2 parents a9b5900 + fd7953d commit 689d630

File tree

39 files changed

+1125
-991
lines changed

39 files changed

+1125
-991
lines changed
 

‎nixos/modules/config/networking.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ in
290290
ln -s /run/systemd/resolve/resolv.conf /run/resolvconf/interfaces/systemd
291291
''}
292292
293-
# Make sure resolv.conf is up to date if not managed by systemd
294-
${optionalString (!config.services.resolved.enable) ''
293+
# Make sure resolv.conf is up to date if not managed manually or by systemd
294+
${optionalString (!config.environment.etc?"resolv.conf") ''
295295
${pkgs.openresolv}/bin/resolvconf -u
296296
''}
297297
'';

‎nixos/modules/services/monitoring/statsd.nix

+22-9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ let
99
isBuiltinBackend = name:
1010
builtins.elem name [ "graphite" "console" "repeater" ];
1111

12+
backendsToPackages = let
13+
mkMap = list: name:
14+
if isBuiltinBackend name then list
15+
else list ++ [ pkgs.nodePackages.${name} ];
16+
in foldl mkMap [];
17+
1218
configFile = pkgs.writeText "statsd.conf" ''
1319
{
1420
address: "${cfg.listenAddress}",
@@ -27,13 +33,21 @@ let
2733
prettyprint: false
2834
},
2935
log: {
30-
backend: "syslog"
36+
backend: "stdout"
3137
},
3238
automaticConfigReload: false${optionalString (cfg.extraConfig != null) ","}
3339
${cfg.extraConfig}
3440
}
3541
'';
3642

43+
deps = pkgs.buildEnv {
44+
name = "statsd-runtime-deps";
45+
pathsToLink = [ "/lib" ];
46+
ignoreCollisions = true;
47+
48+
paths = backendsToPackages cfg.backends;
49+
};
50+
3751
in
3852

3953
{
@@ -42,11 +56,7 @@ in
4256

4357
options.services.statsd = {
4458

45-
enable = mkOption {
46-
description = "Whether to enable statsd stats aggregation service";
47-
default = false;
48-
type = types.bool;
49-
};
59+
enable = mkEnableOption "statsd";
5060

5161
listenAddress = mkOption {
5262
description = "Address that statsd listens on over UDP";
@@ -110,6 +120,11 @@ in
110120

111121
config = mkIf cfg.enable {
112122

123+
assertions = map (backend: {
124+
assertion = !isBuiltinBackend backend -> hasAttrByPath [ backend ] pkgs.nodePackages;
125+
message = "Only builtin backends (graphite, console, repeater) or backends enumerated in `pkgs.nodePackages` are allowed!";
126+
}) cfg.backends;
127+
113128
users.extraUsers = singleton {
114129
name = "statsd";
115130
uid = config.ids.uids.statsd;
@@ -120,9 +135,7 @@ in
120135
description = "Statsd Server";
121136
wantedBy = [ "multi-user.target" ];
122137
environment = {
123-
NODE_PATH=concatMapStringsSep ":"
124-
(pkg: "${builtins.getAttr pkg pkgs.statsd.nodePackages}/lib/node_modules")
125-
(filter (name: !isBuiltinBackend name) cfg.backends);
138+
NODE_PATH = "${deps}/lib/node_modules";
126139
};
127140
serviceConfig = {
128141
ExecStart = "${pkgs.statsd}/bin/statsd ${configFile}";

‎nixos/release.nix

+1
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ in rec {
332332
tests.slim = callTest tests/slim.nix {};
333333
tests.smokeping = callTest tests/smokeping.nix {};
334334
tests.snapper = callTest tests/snapper.nix {};
335+
tests.statsd = callTest tests/statsd.nix {};
335336
tests.switchTest = callTest tests/switch-test.nix {};
336337
tests.taskserver = callTest tests/taskserver.nix {};
337338
tests.tomcat = callTest tests/tomcat.nix {};

‎nixos/tests/statsd.nix

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import ./make-test.nix ({ pkgs, lib }:
2+
3+
with lib;
4+
5+
{
6+
name = "statsd";
7+
meta = with pkgs.stdenv.lib.maintainers; {
8+
maintainers = [ ma27 ];
9+
};
10+
11+
nodes.statsd1 = {
12+
services.statsd.enable = true;
13+
services.statsd.backends = [ "statsd-influxdb-backend" "console" ];
14+
services.statsd.extraConfig = ''
15+
influxdb: {
16+
username: "root",
17+
password: "root",
18+
database: "statsd"
19+
}
20+
'';
21+
22+
services.influxdb.enable = true;
23+
24+
systemd.services.influx-init = {
25+
description = "Setup Influx Test Base";
26+
after = [ "influxdb.service" ];
27+
before = [ "statsd.service" ];
28+
29+
script = ''
30+
echo "CREATE DATABASE statsd" | ${pkgs.influxdb}/bin/influx
31+
'';
32+
};
33+
};
34+
35+
testScript = ''
36+
$statsd1->start();
37+
$statsd1->waitForUnit("statsd.service");
38+
$statsd1->succeed("nc -z 127.0.0.1 8126");
39+
'';
40+
})

‎pkgs/applications/networking/p2p/transmission/default.nix

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
1+
{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook
22
, openssl, curl, libevent, inotify-tools, systemd, zlib
33
, enableGTK3 ? false, gtk3
44
, enableSystemd ? stdenv.isLinux
@@ -20,9 +20,10 @@ stdenv.mkDerivation rec {
2020
sha256 = "0pykmhi7pdmzq47glbj8i2im6iarp4wnj4l1pyvsrnba61f0939s";
2121
};
2222

23-
nativeBuildInputs = [ pkgconfig ];
23+
nativeBuildInputs = [ pkgconfig ]
24+
++ optionals enableGTK3 [ wrapGAppsHook ];
2425
buildInputs = [ intltool file openssl curl libevent zlib ]
25-
++ optionals enableGTK3 [ gtk3 makeWrapper ]
26+
++ optionals enableGTK3 [ gtk3 ]
2627
++ optionals enableSystemd [ systemd ]
2728
++ optionals stdenv.isLinux [ inotify-tools ];
2829

@@ -41,10 +42,8 @@ stdenv.mkDerivation rec {
4142
++ optional enableSystemd "--with-systemd-daemon"
4243
++ optional enableGTK3 "--with-gtk";
4344

44-
preFixup = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
45+
preFixup = optionalString enableGTK3 ''
4546
rm "$out/share/icons/hicolor/icon-theme.cache"
46-
wrapProgram "$out/bin/transmission-gtk" \
47-
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
4847
'';
4948

5049
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation";

‎pkgs/build-support/vm/default.nix

+13
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,19 @@ rec {
13221322
archs = ["noarch" "x86_64"];
13231323
packages = commonCentOSPackages ++ [ "procps-ng" ];
13241324
};
1325+
1326+
centos74x86_64 = rec {
1327+
name = "centos-7.4-x86_64";
1328+
fullName = "CentOS 7.4 (x86_64)";
1329+
# N.B. Switch to vault.centos.org when the next release comes out
1330+
urlPrefix = http://mirror.centos.org/centos-7/7.4.1708/os/x86_64;
1331+
packagesList = fetchurl {
1332+
url = "${urlPrefix}/repodata/b686d3a0f337323e656d9387b9a76ce6808b26255fc3a138b1a87d3b1cb95ed5-primary.xml.gz";
1333+
sha256 = "1mayp4f3nzd8n4wa3hsz4lk8p076djkvk1wkdmjkwcipyfhd71mn";
1334+
};
1335+
archs = ["noarch" "x86_64"];
1336+
packages = commonCentOSPackages ++ [ "procps-ng" ];
1337+
};
13251338
};
13261339

13271340

‎pkgs/desktops/gnome-3/core/dconf-editor/default.nix

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ stdenv.mkDerivation rec {
77
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
88

99
buildInputs = [ vala libxslt glib dbus_glib gnome3.gtk libxml2 gnome3.defaultIconTheme
10-
gnome3.gsettings_desktop_schemas
1110
intltool docbook_xsl docbook_xsl_ns gnome3.dconf ];
1211

1312
meta = with stdenv.lib; {

‎pkgs/development/compilers/dmd/2.067.1.nix

-167
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.