git.iko.soy/typeable/nixpkgs
on master help sign in
logstash: fix download url

Update pkgs/tools/misc/logstash/7.x.nix Co-authored-by: Mihai Fufezan <36706276+fufexan@users.noreply.github.com> Update pkgs/tools/misc/logstash/7.x.nix Co-authored-by: Mihai Fufezan <36706276+fufexan@users.noreply.github.com>

commit159be7791c43ec5b3db0403bf47373981a6d7f9f authorhappysalada <raphael@megzari.com> dateMon 30 Aug 2021, 22:50 (5 years ago) parentf9321de
2 files changed+23−13
pkgs/development/tools/misc/kibana/7.x.nix+2−2 pkgs/tools/misc/logstash/7.x.nix+21−11
pkgs/development/tools/misc/kibana/7.x.nix+2−2
@@ -29,11 +29,11 @@ let
2929
3030in
3131stdenv.mkDerivation rec {
32− name = "kibana-${optionalString (!enableUnfree) "oss-"}${version}";
32+ pname = "kibana${optionalString (!enableUnfree) "-oss"}";
3333 version = elk7Version;
3434
3535 src = fetchurl {
36− url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
36+ url = "https://artifacts.elastic.co/downloads/kibana/${pname}-${version}-${plat}-${arch}.tar.gz";
3737 sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture");
3838 };
3939
pkgs/tools/misc/logstash/7.x.nix+21−11
@@ -10,17 +10,28 @@
1010
1111with lib;
1212
13−let this = stdenv.mkDerivation rec {
14− # FIXME 7.10 is not available on the mirror
15− version = "7.9.3";
16− name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";
13+let
14+ info = splitString "-" stdenv.hostPlatform.system;
15+ arch = elemAt info 0;
16+ plat = elemAt info 1;
17+ shas =
18+ if enableUnfree
19+ then {
20+ x86_64-linux = "sha256-5qv4fbFpLf6aduD7wyxXQ6FsCeUqrszRisNBx44vbMY=";
21+ x86_64-darwin = "sha256-7H+Xpo8qF1ZZMkR5n92PVplEN4JsBEYar91zHQhE+Lo=";
22+ }
23+ else {
24+ x86_64-linux = "sha256-jiV2yGPwPgZ5plo3ftImVDLSOsk/XBzFkeeALSObLhU=";
25+ x86_64-darwin = "sha256-UYG+GGr23eAc2GgNX/mXaGU0WKMjiQMPpD1wUvAVz0A=";
26+ };
27+in
28+stdenv.mkDerivation rec {
29+ version = elk7Version;
30+ pname = "logstash${optionalString (!enableUnfree) "-oss"}";
1731
1832 src = fetchurl {
19− url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
20− sha256 =
21− if enableUnfree
22− then "sha256-YM17/LqsMLH15YZp+0pqbEUzmAcCUpIwWT7o+MJN1QE="
23− else "sha256-5HEs/2bi8m64P0R8aHGgyFJCqiFxs1aBF59Wzg9STCM=";
33+ url = "https://artifacts.elastic.co/downloads/logstash/${pname}-${version}-${plat}-${arch}.tar.gz";
34+ sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture");
2435 };
2536
2637 dontBuild = true;
@@ -63,5 +74,4 @@ let this = stdenv.mkDerivation rec {
6374 elk = nixosTests.elk.ELK-7;
6475 }
6576 );
66−};
67−in this
77+}