diff options
Diffstat (limited to 'pkgs/servers')
5 files changed, 74 insertions, 29 deletions
diff --git a/pkgs/servers/monitoring/prometheus/promscale/0001-remove-jaeger-test-dep.patch b/pkgs/servers/monitoring/prometheus/promscale/0001-remove-jaeger-test-dep.patch deleted file mode 100644 index 9266a9aca53cc..0000000000000 --- a/pkgs/servers/monitoring/prometheus/promscale/0001-remove-jaeger-test-dep.patch +++ /dev/null @@ -1,17 +0,0 @@ - -A Promscale test has a dependency on a package which was not intended to be -vendored, so `go mod vendor` breaks. The dependency is not required to build -Promscale, so it can be removed. - -diff --git a/pkg/tests/end_to_end_tests/trace_query_integration_test.go b/pkg/tests/end_to_end_tests/trace_query_integration_test.go -index 84a0d08..efbe5e1 100644 ---- a/pkg/tests/end_to_end_tests/trace_query_integration_test.go -+++ b/pkg/tests/end_to_end_tests/trace_query_integration_test.go -@@ -24,7 +24,6 @@ import ( - ingstr "github.com/timescale/promscale/pkg/pgmodel/ingestor" - "github.com/timescale/promscale/pkg/pgxconn" - -- jaegerQueryApp "github.com/jaegertracing/jaeger/cmd/query/app" - jaegerQueryService "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" - jaegerJSONModel "github.com/jaegertracing/jaeger/model/json" - ) diff --git a/pkgs/servers/monitoring/prometheus/promscale/default.nix b/pkgs/servers/monitoring/prometheus/promscale/default.nix index fbd1661c5f8b1..7dcc5f01e47c0 100644 --- a/pkgs/servers/monitoring/prometheus/promscale/default.nix +++ b/pkgs/servers/monitoring/prometheus/promscale/default.nix @@ -7,20 +7,16 @@ buildGoModule rec { pname = "promscale"; - version = "0.10.0"; + version = "0.17.0"; src = fetchFromGitHub { owner = "timescale"; repo = pname; rev = version; - sha256 = "sha256-KF+aD9vJYqNJkJftx27ZsxmOIXZ/2ciKwjwcTw0GBvY="; + sha256 = "sha256-JizUI9XRzOEHF1kAblYQRYB11z9KWX7od3lPiRN+JNI="; }; - patches = [ - ./0001-remove-jaeger-test-dep.patch - ]; - - vendorSha256 = "sha256-/cjRM8CrOKnx0BcRu2+MLV28MYLOrG5x1DN24mRUJzQ="; + vendorSha256 = "sha256-lnyKsipr/f9W9LWLb2lizKGLvIbS3XnSlOH1u1B87OY="; ldflags = [ "-s" @@ -28,7 +24,11 @@ buildGoModule rec { "-X github.com/timescale/promscale/pkg/version.Version=${version}" "-X github.com/timescale/promscale/pkg/version.CommitHash=${src.rev}" ]; - + preBuild = '' + # Without this build fails with + # main module (github.com/timescale/promscale) does not contain package github.com/timescale/promscale/migration-tool/cmd/prom-migrator + rm -r migration-tool + ''; checkPhase = '' runHook preCheck @@ -51,6 +51,6 @@ buildGoModule rec { changelog = "https://github.com/timescale/promscale/blob/${version}/CHANGELOG.md"; license = licenses.asl20; platforms = platforms.unix; - maintainers = with maintainers; [ _0x4A6F ]; + maintainers = with maintainers; [ _0x4A6F anpin ]; }; } diff --git a/pkgs/servers/simple-http-server/default.nix b/pkgs/servers/simple-http-server/default.nix index e59b9d73d5a85..f2d8309d09019 100644 --- a/pkgs/servers/simple-http-server/default.nix +++ b/pkgs/servers/simple-http-server/default.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "simple-http-server"; - version = "0.6.6"; + version = "0.6.7"; src = fetchFromGitHub { owner = "TheWaWaR"; repo = pname; rev = "v${version}"; - sha256 = "sha256-b+z3rio+kg1Z0B4pqhTlCTtzXgAeCAhinSa9dkIwcaY="; + sha256 = "sha256-Xi5tJIfK4zjckKERhxHuDqeyOB9Dxul/eFLKOtpgR/w="; }; - cargoSha256 = "sha256-teBqgQloI/13F7K/+EBKFcHWqcK1wJrNUu5LO8nwQbo="; + cargoSha256 = "sha256-wv1hlBTQe1Mm67J2FqrrXSSlZkFPB0TzKc5VUMMfUIQ="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/servers/sql/postgresql/ext/promscale_extension.nix b/pkgs/servers/sql/postgresql/ext/promscale_extension.nix new file mode 100644 index 0000000000000..e031bb4c021be --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/promscale_extension.nix @@ -0,0 +1,60 @@ +{ lib +, fetchFromGitHub +, fetchpatch +, buildPgxExtension +, postgresql +, stdenv +, nixosTests +}: + +buildPgxExtension rec { + inherit postgresql; + + pname = "promscale_extension"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "timescale"; + repo = "promscale_extension"; + rev = version; + sha256 = "sha256-vyEfQMGguHrHYdBEEmbev29L2uCa/4xL9DpGIniUwfI="; + }; + + cargoSha256 = "sha256-VK9DObkg4trcGUXxxISCd0zqU3vc1Qt6NxqpgKIARCQ="; + + cargoPatches = [ + # there is a duplicate definition in the lock file which fails to build with buildRustPackage + (fetchpatch { + name = "cargo-vendor.patch"; + url = "https://github.com/timescale/promscale_extension/commit/3048bd959430e9abc2c1d5c772ab6b4fc1dc6a95.patch"; + hash = "sha256-xTk4Ml8GN06QlJdrvAdVK21r30ZR/S83y5A5jJPdOw4="; + }) + ]; + + preBuild = '' + patchShebangs create-upgrade-symlinks.sh extract-extension-version.sh + ## Hack to boostrap the build because some pgx commands require this file. It gets re-generated later. + cp templates/promscale.control ./promscale.control + ''; + postInstall = '' + ln -s $out/lib/promscale-${version}.so $out/lib/promscale.so + ''; + passthru.tests = { + promscale = nixosTests.promscale; + }; + + # tests take really long + doCheck = false; + + meta = with lib; { + description = "Promscale is an open source observability backend for metrics and traces powered by SQL"; + homepage = "https://github.com/timescale/promscale_extension"; + maintainers = with maintainers; [ anpin ]; + platforms = postgresql.meta.platforms; + license = licenses.unfree; + + # as it needs to be used with timescaledb, simply use the condition from there + broken = versionOlder postgresql.version "12" + || versionAtLeast postgresql.version "15"; + }; +} diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index 211a54bb5523f..c94b91f02e2b3 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -71,6 +71,8 @@ self: super: { pg_safeupdate = super.callPackage ./ext/pg_safeupdate.nix { }; + promscale_extension = super.callPackage ./ext/promscale_extension.nix { }; + repmgr = super.callPackage ./ext/repmgr.nix { }; rum = super.callPackage ./ext/rum.nix { }; |