postgresqlPackages.promscale_extension: remove deprecated and broken package
postgresql14Packages.promscale_extension breaks with: Error: 0: `pgx-0.6.1` shouldn't be used with `cargo-pgx-0.7.4`, please use `pgx = "~0.7.4"` in your `Cargo.toml`. However, pinning cargo-pgx to 0_6_1 via the following buildPgxExtension.override { cargo-pgx = cargo-pgx_0_6_1; } does not work either, because the build then fails with: thread 'main' panicked at /build/promscale_extension-0.8.0-vendor.tar.gz/proc-macro2/src/fallback.rs:756:9: "__mbstate_t_union_(unnamed_at_/nix/store/ij144ma6vs8acil8r9hgr8xkb1dp9azg-glibc-2_39-5-dev/include/bits/types/__mbstate_t_h_16_3)" is not a valid Ident This seems to be related to [1], which indicates that this is a problem with newer LLVM / clang toolchains. At the same time th upstream package is deprecated / archived since the 2nd of April 2024 [2]. Additionally this package is unfree and thus very unlikely to be forked. Since we can't expect this to be fixed, the only sensible thing to do is to remove the package. [1]: https://github.com/rust-lang/rust-bindgen/issues/2312 [2]: https://github.com/timescale/promscale/issues/1836
This commit is contained in:
parent
0d56eca281
commit
945a3bbb8b
|
@ -939,7 +939,6 @@ in {
|
|||
tiddlywiki = handleTest ./tiddlywiki.nix {};
|
||||
tigervnc = handleTest ./tigervnc.nix {};
|
||||
timescaledb = handleTest ./timescaledb.nix {};
|
||||
promscale = handleTest ./promscale.nix {};
|
||||
timezone = handleTest ./timezone.nix {};
|
||||
tinc = handleTest ./tinc {};
|
||||
tinydns = handleTest ./tinydns.nix {};
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
# mostly copied from ./timescaledb.nix which was copied from ./postgresql.nix
|
||||
# as it seemed unapproriate to test additional extensions for postgresql there.
|
||||
|
||||
{ system ? builtins.currentSystem
|
||||
, config ? { }
|
||||
, pkgs ? import ../.. { inherit system config; }
|
||||
}:
|
||||
|
||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
postgresql-versions = import ../../pkgs/servers/sql/postgresql pkgs;
|
||||
test-sql = pkgs.writeText "postgresql-test" ''
|
||||
CREATE USER promscale SUPERUSER PASSWORD 'promscale';
|
||||
CREATE DATABASE promscale OWNER promscale;
|
||||
'';
|
||||
|
||||
make-postgresql-test = postgresql-name: postgresql-package: makeTest {
|
||||
name = postgresql-name;
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ anpin ];
|
||||
};
|
||||
|
||||
nodes.machine = { config, pkgs, ... }:
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = postgresql-package;
|
||||
extraPlugins = ps: with ps; [
|
||||
timescaledb
|
||||
promscale_extension
|
||||
];
|
||||
settings = { shared_preload_libraries = "timescaledb, promscale"; };
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ promscale ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("postgresql")
|
||||
with subtest("Postgresql with extensions timescaledb and promscale is available just after unit start"):
|
||||
print(machine.succeed("sudo -u postgres psql -f ${test-sql}"))
|
||||
machine.succeed("sudo -u postgres psql promscale -c 'SHOW shared_preload_libraries;' | grep promscale")
|
||||
machine.succeed(
|
||||
"promscale --db.name promscale --db.password promscale --db.user promscale --db.ssl-mode allow --startup.install-extensions --startup.only"
|
||||
)
|
||||
machine.succeed("sudo -u postgres psql promscale -c 'SELECT ps_trace.get_trace_retention_period();' | grep '(1 row)'")
|
||||
machine.shutdown()
|
||||
'';
|
||||
};
|
||||
#version 15 is not supported yet
|
||||
applicablePostgresqlVersions = filterAttrs (_: value: versionAtLeast value.version "12" && !(versionAtLeast value.version "15")) postgresql-versions;
|
||||
in
|
||||
mapAttrs'
|
||||
(name: package: {
|
||||
inherit name;
|
||||
value = make-postgresql-test name package;
|
||||
})
|
||||
applicablePostgresqlVersions
|
|
@ -99,8 +99,6 @@ self: super: {
|
|||
|
||||
pg_uuidv7 = super.callPackage ./pg_uuidv7.nix { };
|
||||
|
||||
promscale_extension = super.callPackage ./promscale_extension.nix { };
|
||||
|
||||
repmgr = super.callPackage ./repmgr.nix { };
|
||||
|
||||
rum = super.callPackage ./rum.nix { };
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
{ 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 = versionAtLeast postgresql.version "15";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue