diff options
author | happysalada <raphael@megzari.com> | 2021-08-31 17:45:44 +0900 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-08-31 18:05:09 +0900 |
commit | 274c9f6e0bab2cf7955059ee317098d1f6d9b643 (patch) | |
tree | 80dc6778ecc48f6b56b4eda95fcc2cfe7db1d056 /pkgs/tools/misc/logstash | |
parent | ccc9139fc9eb206463c5af7292bcf856616901d8 (diff) |
logstash: fix passthru.tests
Diffstat (limited to 'pkgs/tools/misc/logstash')
-rw-r--r-- | pkgs/tools/misc/logstash/7.x.nix | 85 |
1 files changed, 43 insertions, 42 deletions
diff --git a/pkgs/tools/misc/logstash/7.x.nix b/pkgs/tools/misc/logstash/7.x.nix index 83a063c125efd..c0c67b19b10a4 100644 --- a/pkgs/tools/misc/logstash/7.x.nix +++ b/pkgs/tools/misc/logstash/7.x.nix @@ -24,54 +24,55 @@ let x86_64-linux = "sha256-jiV2yGPwPgZ5plo3ftImVDLSOsk/XBzFkeeALSObLhU="; x86_64-darwin = "sha256-UYG+GGr23eAc2GgNX/mXaGU0WKMjiQMPpD1wUvAVz0A="; }; -in -stdenv.mkDerivation rec { - version = elk7Version; - pname = "logstash${optionalString (!enableUnfree) "-oss"}"; + this = stdenv.mkDerivation rec { + version = elk7Version; + pname = "logstash${optionalString (!enableUnfree) "-oss"}"; - src = fetchurl { - url = "https://artifacts.elastic.co/downloads/logstash/${pname}-${version}-${plat}-${arch}.tar.gz"; - sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture"); - }; + src = fetchurl { + url = "https://artifacts.elastic.co/downloads/logstash/${pname}-${version}-${plat}-${arch}.tar.gz"; + sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture"); + }; - dontBuild = true; - dontPatchELF = true; - dontStrip = true; - dontPatchShebangs = true; + dontBuild = true; + dontPatchELF = true; + dontStrip = true; + dontPatchShebangs = true; - buildInputs = [ - makeWrapper - jre - ]; + buildInputs = [ + makeWrapper + jre + ]; - installPhase = '' - runHook preInstall - mkdir -p $out - cp -r {Gemfile*,modules,vendor,lib,bin,config,data,logstash-core,logstash-core-plugin-api} $out + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r {Gemfile*,modules,vendor,lib,bin,config,data,logstash-core,logstash-core-plugin-api} $out - patchShebangs $out/bin/logstash - patchShebangs $out/bin/logstash-plugin + patchShebangs $out/bin/logstash + patchShebangs $out/bin/logstash-plugin - wrapProgram $out/bin/logstash \ - --set JAVA_HOME "${jre}" + wrapProgram $out/bin/logstash \ + --set JAVA_HOME "${jre}" - wrapProgram $out/bin/logstash-plugin \ - --set JAVA_HOME "${jre}" - runHook postInstall - ''; + wrapProgram $out/bin/logstash-plugin \ + --set JAVA_HOME "${jre}" + runHook postInstall + ''; - meta = with lib; { - description = "Logstash is a data pipeline that helps you process logs and other event data from a variety of systems"; - homepage = "https://www.elastic.co/products/logstash"; - license = if enableUnfree then licenses.elastic else licenses.asl20; - platforms = platforms.unix; - maintainers = with maintainers; [ wjlroe offline basvandijk ]; + meta = with lib; { + description = "Logstash is a data pipeline that helps you process logs and other event data from a variety of systems"; + homepage = "https://www.elastic.co/products/logstash"; + license = if enableUnfree then licenses.elastic else licenses.asl20; + 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; + } + ); }; - passthru.tests = - optionalAttrs (!enableUnfree) ( - assert this.drvPath == nixosTests.elk.ELK-7.elkPackages.logstash.drvPath; - { - elk = nixosTests.elk.ELK-7; - } - ); -} +in +this |