Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions nixos/modules/services/logging/logstash.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ in
###### implementation

config = mkIf cfg.enable {
systemd.services.logstash = with pkgs; {
systemd.services.logstash = {
description = "Logstash Daemon";
wantedBy = [ "multi-user.target" ];
environment = { JAVA_HOME = jre; };
path = [ pkgs.bash ];
serviceConfig = {
ExecStartPre = ''${pkgs.coreutils}/bin/mkdir -p "${cfg.dataDir}" ; ${pkgs.coreutils}/bin/chmod 700 "${cfg.dataDir}"'';
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/elk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ let
};
};

passthru.elkPackages = elk;
testScript = ''
import json

Expand Down
13 changes: 11 additions & 2 deletions pkgs/tools/misc/logstash/6.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
, lib, stdenv
, fetchurl
, makeWrapper
, nixosTests
, jre
}:

with lib;

stdenv.mkDerivation rec {
let this = stdenv.mkDerivation rec {
version = elk6Version;
name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";

Expand Down Expand Up @@ -52,4 +53,12 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = with maintainers; [ wjlroe offline basvandijk ];
};
}
passthru.tests =
optionalAttrs (!enableUnfree) (
assert this.drvPath == nixosTests.elk.ELK-6.elkPackages.logstash.drvPath;
{
elk = nixosTests.elk.ELK-6;
}
);
};
in this
13 changes: 11 additions & 2 deletions pkgs/tools/misc/logstash/7.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
, lib, stdenv
, fetchurl
, makeWrapper
, nixosTests
, jre
}:

with lib;

stdenv.mkDerivation rec {
let this = stdenv.mkDerivation rec {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why we need the let in here. Do I miss something?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for the assertion in passthru.tests.

version = elk7Version;
name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";

Expand Down Expand Up @@ -52,4 +53,12 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = with maintainers; [ wjlroe offline basvandijk ];
};
}
passthru.tests =
optionalAttrs (!enableUnfree) (
assert this.drvPath == nixosTests.elk.ELK-7.elkPackages.logstash.drvPath;
{
elk = nixosTests.elk.ELK-7;
}
);
};
in this
14 changes: 12 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5823,13 +5823,23 @@ in

lockfileProgs = callPackage ../tools/misc/lockfile-progs { };

logstash6 = callPackage ../tools/misc/logstash/6.x.nix { };
logstash6 = callPackage ../tools/misc/logstash/6.x.nix {
# https://www.elastic.co/support/matrix#logstash-and-jvm
jre = jdk11_headless;
};
logstash6-oss = callPackage ../tools/misc/logstash/6.x.nix {
enableUnfree = false;
# https://www.elastic.co/support/matrix#logstash-and-jvm
jre = jdk11_headless;
};
logstash7 = callPackage ../tools/misc/logstash/7.x.nix {
# https://www.elastic.co/support/matrix#logstash-and-jvm
jre = jdk11_headless;
};
logstash7 = callPackage ../tools/misc/logstash/7.x.nix { };
logstash7-oss = callPackage ../tools/misc/logstash/7.x.nix {
enableUnfree = false;
# https://www.elastic.co/support/matrix#logstash-and-jvm
jre = jdk11_headless;
};
logstash = logstash6;

Expand Down