diff --git a/nixos/tests/elk.nix b/nixos/tests/elk.nix index 8488c97c01e8..fee350de65b5 100644 --- a/nixos/tests/elk.nix +++ b/nixos/tests/elk.nix @@ -120,6 +120,7 @@ let }; }; + passthru.elkPackages = elk; testScript = '' import json diff --git a/pkgs/tools/misc/logstash/6.x.nix b/pkgs/tools/misc/logstash/6.x.nix index 97ee5b2ed3f3..1c7ab29cbc86 100644 --- a/pkgs/tools/misc/logstash/6.x.nix +++ b/pkgs/tools/misc/logstash/6.x.nix @@ -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}"; @@ -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 diff --git a/pkgs/tools/misc/logstash/7.x.nix b/pkgs/tools/misc/logstash/7.x.nix index 0817a7ab087e..1abc0ff9bf82 100644 --- a/pkgs/tools/misc/logstash/7.x.nix +++ b/pkgs/tools/misc/logstash/7.x.nix @@ -3,12 +3,13 @@ , lib, stdenv , fetchurl , makeWrapper +, nixosTests , jre }: with lib; -stdenv.mkDerivation rec { +let this = stdenv.mkDerivation rec { version = elk7Version; name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}"; @@ -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