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

-122
-1
nixos/tests/all-tests.nix
··· 939 tiddlywiki = handleTest ./tiddlywiki.nix {}; 940 tigervnc = handleTest ./tigervnc.nix {}; 941 timescaledb = handleTest ./timescaledb.nix {}; 942 - promscale = handleTest ./promscale.nix {}; 943 timezone = handleTest ./timezone.nix {}; 944 tinc = handleTest ./tinc {}; 945 tinydns = handleTest ./tinydns.nix {};
··· 939 tiddlywiki = handleTest ./tiddlywiki.nix {}; 940 tigervnc = handleTest ./tigervnc.nix {}; 941 timescaledb = handleTest ./timescaledb.nix {}; 942 timezone = handleTest ./timezone.nix {}; 943 tinc = handleTest ./tinc {}; 944 tinydns = handleTest ./tinydns.nix {};
-60
nixos/tests/promscale.nix
··· 1 - # mostly copied from ./timescaledb.nix which was copied from ./postgresql.nix 2 - # as it seemed unapproriate to test additional extensions for postgresql there. 3 - 4 - { system ? builtins.currentSystem 5 - , config ? { } 6 - , pkgs ? import ../.. { inherit system config; } 7 - }: 8 - 9 - with import ../lib/testing-python.nix { inherit system pkgs; }; 10 - with pkgs.lib; 11 - 12 - let 13 - postgresql-versions = import ../../pkgs/servers/sql/postgresql pkgs; 14 - test-sql = pkgs.writeText "postgresql-test" '' 15 - CREATE USER promscale SUPERUSER PASSWORD 'promscale'; 16 - CREATE DATABASE promscale OWNER promscale; 17 - ''; 18 - 19 - make-postgresql-test = postgresql-name: postgresql-package: makeTest { 20 - name = postgresql-name; 21 - meta = with pkgs.lib.maintainers; { 22 - maintainers = [ anpin ]; 23 - }; 24 - 25 - nodes.machine = { config, pkgs, ... }: 26 - { 27 - services.postgresql = { 28 - enable = true; 29 - package = postgresql-package; 30 - extraPlugins = ps: with ps; [ 31 - timescaledb 32 - promscale_extension 33 - ]; 34 - settings = { shared_preload_libraries = "timescaledb, promscale"; }; 35 - }; 36 - environment.systemPackages = with pkgs; [ promscale ]; 37 - }; 38 - 39 - testScript = '' 40 - machine.start() 41 - machine.wait_for_unit("postgresql") 42 - with subtest("Postgresql with extensions timescaledb and promscale is available just after unit start"): 43 - print(machine.succeed("sudo -u postgres psql -f ${test-sql}")) 44 - machine.succeed("sudo -u postgres psql promscale -c 'SHOW shared_preload_libraries;' | grep promscale") 45 - machine.succeed( 46 - "promscale --db.name promscale --db.password promscale --db.user promscale --db.ssl-mode allow --startup.install-extensions --startup.only" 47 - ) 48 - machine.succeed("sudo -u postgres psql promscale -c 'SELECT ps_trace.get_trace_retention_period();' | grep '(1 row)'") 49 - machine.shutdown() 50 - ''; 51 - }; 52 - #version 15 is not supported yet 53 - applicablePostgresqlVersions = filterAttrs (_: value: versionAtLeast value.version "12" && !(versionAtLeast value.version "15")) postgresql-versions; 54 - in 55 - mapAttrs' 56 - (name: package: { 57 - inherit name; 58 - value = make-postgresql-test name package; 59 - }) 60 - applicablePostgresqlVersions
···
-2
pkgs/servers/sql/postgresql/ext/default.nix
··· 99 100 pg_uuidv7 = super.callPackage ./pg_uuidv7.nix { }; 101 102 - promscale_extension = super.callPackage ./promscale_extension.nix { }; 103 - 104 repmgr = super.callPackage ./repmgr.nix { }; 105 106 rum = super.callPackage ./rum.nix { };
··· 99 100 pg_uuidv7 = super.callPackage ./pg_uuidv7.nix { }; 101 102 repmgr = super.callPackage ./repmgr.nix { }; 103 104 rum = super.callPackage ./rum.nix { };
-59
pkgs/servers/sql/postgresql/ext/promscale_extension.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , fetchpatch 4 - , buildPgxExtension 5 - , postgresql 6 - , stdenv 7 - , nixosTests 8 - }: 9 - 10 - buildPgxExtension rec { 11 - inherit postgresql; 12 - 13 - pname = "promscale_extension"; 14 - version = "0.8.0"; 15 - 16 - src = fetchFromGitHub { 17 - owner = "timescale"; 18 - repo = "promscale_extension"; 19 - rev = version; 20 - sha256 = "sha256-vyEfQMGguHrHYdBEEmbev29L2uCa/4xL9DpGIniUwfI="; 21 - }; 22 - 23 - cargoSha256 = "sha256-VK9DObkg4trcGUXxxISCd0zqU3vc1Qt6NxqpgKIARCQ="; 24 - 25 - cargoPatches = [ 26 - # there is a duplicate definition in the lock file which fails to build with buildRustPackage 27 - (fetchpatch { 28 - name = "cargo-vendor.patch"; 29 - url = "https://github.com/timescale/promscale_extension/commit/3048bd959430e9abc2c1d5c772ab6b4fc1dc6a95.patch"; 30 - hash = "sha256-xTk4Ml8GN06QlJdrvAdVK21r30ZR/S83y5A5jJPdOw4="; 31 - }) 32 - ]; 33 - 34 - preBuild = '' 35 - patchShebangs create-upgrade-symlinks.sh extract-extension-version.sh 36 - ## Hack to boostrap the build because some pgx commands require this file. It gets re-generated later. 37 - cp templates/promscale.control ./promscale.control 38 - ''; 39 - postInstall = '' 40 - ln -s $out/lib/promscale-${version}.so $out/lib/promscale.so 41 - ''; 42 - passthru.tests = { 43 - promscale = nixosTests.promscale; 44 - }; 45 - 46 - # tests take really long 47 - doCheck = false; 48 - 49 - meta = with lib; { 50 - description = "Promscale is an open source observability backend for metrics and traces powered by SQL"; 51 - homepage = "https://github.com/timescale/promscale_extension"; 52 - maintainers = with maintainers; [ anpin ]; 53 - platforms = postgresql.meta.platforms; 54 - license = licenses.unfree; 55 - 56 - # as it needs to be used with timescaledb, simply use the condition from there 57 - broken = versionAtLeast postgresql.version "15"; 58 - }; 59 - }
···