Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Nov 4, 2017
2 parents eed6e0a + d902478 commit 61f3d46
Show file tree
Hide file tree
Showing 31 changed files with 726 additions and 477 deletions.
8 changes: 3 additions & 5 deletions doc/meta.xml
Expand Up @@ -200,11 +200,9 @@ meta-attributes</title>
meta.platforms = stdenv.lib.platforms.linux;
</programlisting>

Attribute Set <varname>stdenv.lib.platforms</varname> in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/platforms.nix">
<filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
lists of platforms types.
</para></listitem>
Attribute Set <varname>stdenv.lib.platforms</varname> defines
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix">
various common lists</link> of platforms types.</para></listitem>
</varlistentry>

<varlistentry>
Expand Down
8 changes: 8 additions & 0 deletions nixos/doc/manual/release-notes/rl-1803.xml
Expand Up @@ -90,6 +90,14 @@ following incompatible changes:</para>
That means that old configuration is not overwritten by default when update to the znc options are made.
</para>
</listitem>
<listitem>
<para>
The option <option>services.xserver.desktopManager.default</option> is now <literal>none</literal> by default.
An assertion failure is thrown if WM's and DM's default are <literal>none</literal>.
To explicitly run a plain X session without and DM or WM, the newly introduced option <option>services.xserver.plainX</option>
must be set to true.
</para>
</listitem>
</itemizedlist>

</section>
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/x11/desktop-managers/default.nix
Expand Up @@ -87,8 +87,8 @@ in

default = mkOption {
type = types.str;
default = "";
example = "none";
default = "none";
example = "plasma5";
description = "Default desktop manager loaded if none have been chosen.";
apply = defaultDM:
if defaultDM == "" && cfg.session.list != [] then
Expand Down
12 changes: 12 additions & 0 deletions nixos/modules/services/x11/xserver.nix
Expand Up @@ -161,6 +161,15 @@ in
'';
};

plainX = mkOption {
type = types.bool;
default = false;
description = ''
Whether the X11 session can be plain (without DM/WM) and
the Xsession script will be used as fallback or not.
'';
};

autorun = mkOption {
type = types.bool;
default = true;
Expand Down Expand Up @@ -552,6 +561,9 @@ in
+ "${toString (length primaryHeads)} heads set to primary: "
+ concatMapStringsSep ", " (x: x.output) primaryHeads;
})
{ assertion = cfg.desktopManager.default == "none" && cfg.windowManager.default == "none" -> cfg.plainX;
message = "Either the desktop manager or the window manager shouldn't be `none`! To explicitly allow this, you can also set `services.xserver.plainX` to `true`.";
}
];

environment.etc =
Expand Down
6 changes: 5 additions & 1 deletion nixos/release.nix
Expand Up @@ -270,6 +270,10 @@ in rec {
tests.plasma5 = callTest tests/plasma5.nix {};
tests.keymap = callSubTests tests/keymap.nix {};
tests.initrdNetwork = callTest tests/initrd-network.nix {};
tests.kafka_0_9 = callTest tests/kafka_0_9.nix {};
tests.kafka_0_10 = callTest tests/kafka_0_10.nix {};
tests.kafka_0_11 = callTest tests/kafka_0_11.nix {};
tests.kafka_1_0 = callTest tests/kafka_1_0.nix {};
tests.kernel-copperhead = callTest tests/kernel-copperhead.nix {};
tests.kernel-latest = callTest tests/kernel-latest.nix {};
tests.kernel-lts = callTest tests/kernel-lts.nix {};
Expand Down Expand Up @@ -330,7 +334,7 @@ in rec {
tests.wordpress = callTest tests/wordpress.nix {};
tests.xfce = callTest tests/xfce.nix {};
tests.xmonad = callTest tests/xmonad.nix {};

tests.zookeeper = callTest tests/zookeeper.nix {};

/* Build a bunch of typical closures so that Hydra can keep track of
the evolution of closure sizes. */
Expand Down
48 changes: 48 additions & 0 deletions nixos/tests/kafka_0_10.nix
@@ -0,0 +1,48 @@
import ./make-test.nix ({ pkgs, lib, ... } :
let
kafkaPackage = pkgs.apacheKafka_0_10;
in {
name = "kafka_0_10";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};

nodes = {
zookeeper1 = { config, ... }: {
services.zookeeper = {
enable = true;
};

networking.firewall.allowedTCPPorts = [ 2181 ];
};
kafka = { config, ... }: {
services.apache-kafka = {
enable = true;
extraProperties = ''
offsets.topic.replication.factor = 1
'';
package = kafkaPackage;
zookeeper = "zookeeper1:2181";
};

networking.firewall.allowedTCPPorts = [ 9092 ];
virtualisation.memorySize = 2048;
};
};

testScript = ''
startAll;
$zookeeper1->waitForUnit("zookeeper");
$zookeeper1->waitForUnit("network.target");
$zookeeper1->waitForOpenPort(2181);
$kafka->waitForUnit("apache-kafka");
$kafka->waitForUnit("network.target");
$kafka->waitForOpenPort(9092);
$kafka->waitUntilSucceeds("${kafkaPackage}/bin/kafka-topics.sh --create --zookeeper zookeeper1:2181 --partitions 1 --replication-factor 1 --topic testtopic");
$kafka->mustSucceed("echo 'test 1' | ${kafkaPackage}/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testtopic");
$kafka->mustSucceed("${kafkaPackage}/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic testtopic --from-beginning --max-messages 1 | grep 'test 1'");
'';
})
48 changes: 48 additions & 0 deletions nixos/tests/kafka_0_11.nix
@@ -0,0 +1,48 @@
import ./make-test.nix ({ pkgs, lib, ... } :
let
kafkaPackage = pkgs.apacheKafka_0_11;
in {
name = "kafka_0_11";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};

nodes = {
zookeeper1 = { config, ... }: {
services.zookeeper = {
enable = true;
};

networking.firewall.allowedTCPPorts = [ 2181 ];
};
kafka = { config, ... }: {
services.apache-kafka = {
enable = true;
extraProperties = ''
offsets.topic.replication.factor = 1
'';
package = kafkaPackage;
zookeeper = "zookeeper1:2181";
};

networking.firewall.allowedTCPPorts = [ 9092 ];
virtualisation.memorySize = 2048;
};
};

testScript = ''
startAll;
$zookeeper1->waitForUnit("zookeeper");
$zookeeper1->waitForUnit("network.target");
$zookeeper1->waitForOpenPort(2181);
$kafka->waitForUnit("apache-kafka");
$kafka->waitForUnit("network.target");
$kafka->waitForOpenPort(9092);
$kafka->waitUntilSucceeds("${kafkaPackage}/bin/kafka-topics.sh --create --zookeeper zookeeper1:2181 --partitions 1 --replication-factor 1 --topic testtopic");
$kafka->mustSucceed("echo 'test 1' | ${kafkaPackage}/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testtopic");
$kafka->mustSucceed("${kafkaPackage}/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic testtopic --from-beginning --max-messages 1 | grep 'test 1'");
'';
})
48 changes: 48 additions & 0 deletions nixos/tests/kafka_0_9.nix
@@ -0,0 +1,48 @@
import ./make-test.nix ({ pkgs, lib, ... } :
let
kafkaPackage = pkgs.apacheKafka_0_9;
in {
name = "kafka_0_9";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};

nodes = {
zookeeper1 = { config, ... }: {
services.zookeeper = {
enable = true;
};

networking.firewall.allowedTCPPorts = [ 2181 ];
};
kafka = { config, ... }: {
services.apache-kafka = {
enable = true;
extraProperties = ''
offsets.topic.replication.factor = 1
'';
package = kafkaPackage;
zookeeper = "zookeeper1:2181";
};

networking.firewall.allowedTCPPorts = [ 9092 ];
virtualisation.memorySize = 2048;
};
};

testScript = ''
startAll;
$zookeeper1->waitForUnit("zookeeper");
$zookeeper1->waitForUnit("network.target");
$zookeeper1->waitForOpenPort(2181);
$kafka->waitForUnit("apache-kafka");
$kafka->waitForUnit("network.target");
$kafka->waitForOpenPort(9092);
$kafka->waitUntilSucceeds("${kafkaPackage}/bin/kafka-topics.sh --create --zookeeper zookeeper1:2181 --partitions 1 --replication-factor 1 --topic testtopic");
$kafka->mustSucceed("echo 'test 1' | ${kafkaPackage}/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testtopic");
$kafka->mustSucceed("${kafkaPackage}/bin/kafka-console-consumer.sh --zookeeper zookeeper1:2181 --topic testtopic --from-beginning --max-messages 1 | grep 'test 1'");
'';
})
48 changes: 48 additions & 0 deletions nixos/tests/kafka_1_0.nix
@@ -0,0 +1,48 @@
import ./make-test.nix ({ pkgs, lib, ... } :
let
kafkaPackage = pkgs.apacheKafka_1_0;
in {
name = "kafka_1_0";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};

nodes = {
zookeeper1 = { config, ... }: {
services.zookeeper = {
enable = true;
};

networking.firewall.allowedTCPPorts = [ 2181 ];
};
kafka = { config, ... }: {
services.apache-kafka = {
enable = true;
extraProperties = ''
offsets.topic.replication.factor = 1
'';
package = kafkaPackage;
zookeeper = "zookeeper1:2181";
};

networking.firewall.allowedTCPPorts = [ 9092 ];
virtualisation.memorySize = 2048;
};
};

testScript = ''
startAll;
$zookeeper1->waitForUnit("zookeeper");
$zookeeper1->waitForUnit("network.target");
$zookeeper1->waitForOpenPort(2181);
$kafka->waitForUnit("apache-kafka");
$kafka->waitForUnit("network.target");
$kafka->waitForOpenPort(9092);
$kafka->waitUntilSucceeds("${kafkaPackage}/bin/kafka-topics.sh --create --zookeeper zookeeper1:2181 --partitions 1 --replication-factor 1 --topic testtopic");
$kafka->mustSucceed("echo 'test 1' | ${kafkaPackage}/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testtopic");
$kafka->mustSucceed("${kafkaPackage}/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic testtopic --from-beginning --max-messages 1 | grep 'test 1'");
'';
})
28 changes: 28 additions & 0 deletions nixos/tests/zookeeper.nix
@@ -0,0 +1,28 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "zookeeper";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};

nodes = {
server = { pkgs, config, ... }: {
services.zookeeper = {
enable = true;
};

networking.firewall.allowedTCPPorts = [ 2181 ];
};
};

testScript = ''
startAll;
$server->waitForUnit("zookeeper");
$server->waitForUnit("network.target");
$server->waitForOpenPort(2181);
$server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 create /foo bar");
$server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 set /foo hello");
$server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello");
'';
})
2 changes: 1 addition & 1 deletion pkgs/applications/editors/textadept/default.nix
Expand Up @@ -32,7 +32,7 @@ let
build_dir=$PWD
cd $TMPDIR
local_path=$(basename ${store_path} .zip | sed -e 's/^[a-z0-9]*-//')
local_path=$(basename ${url} .zip)
cp -r ${store_path} $local_path
chmod u+rwX -R $local_path
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/synergy/default.nix
Expand Up @@ -9,7 +9,7 @@ stdenv.mkDerivation rec {

src = fetchFromGitHub {
owner = "symless";
repo = "synergy";
repo = "synergy-core";
rev = "v${version}-stable";
sha256 = "0ksgr9hkf09h54572p7k7b9zkfhcdb2g2d5x7ixxn028y8i3jyp3";
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/tilix/default.nix
Expand Up @@ -4,13 +4,13 @@

stdenv.mkDerivation rec {
name = "tilix-${version}";
version = "1.6.4";
version = "1.7.1";

src = fetchFromGitHub {
owner = "gnunn1";
repo = "tilix";
rev = "${version}";
sha256 = "1vqi68jlbbaky1569kd4lr6p02zsiv7v2rfb8j1pzwj7gydblaac";
sha256 = "0x0bnb26hjvxmvvd7c9k8fw97gcm3z5ssr6r8x90xbyyw6h58hhh";
};

nativeBuildInputs = [
Expand Down

0 comments on commit 61f3d46

Please sign in to comment.