2022-10-30 19:37:20 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPgxExtension
|
|
|
|
, postgresql
|
2022-10-31 08:21:18 +00:00
|
|
|
, nixosTests
|
2023-05-12 10:54:09 +00:00
|
|
|
, cargo-pgx_0_7_1
|
|
|
|
, nix-update-script
|
2023-05-25 22:27:35 +00:00
|
|
|
, stdenv
|
2022-10-30 19:37:20 +00:00
|
|
|
}:
|
|
|
|
|
2023-05-12 10:54:09 +00:00
|
|
|
(buildPgxExtension.override {cargo-pgx = cargo-pgx_0_7_1;})rec {
|
2022-10-30 19:37:20 +00:00
|
|
|
inherit postgresql;
|
|
|
|
|
|
|
|
pname = "timescaledb_toolkit";
|
2023-05-12 10:54:09 +00:00
|
|
|
version = "1.16.0";
|
2022-10-30 19:37:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "timescale";
|
|
|
|
repo = "timescaledb-toolkit";
|
|
|
|
rev = version;
|
2023-05-12 10:54:09 +00:00
|
|
|
sha256 = "sha256-aivGURTsm0dGaFq75qR3wIkXwsbvBiDEg+qLMcqKMj8=";
|
2022-10-30 19:37:20 +00:00
|
|
|
};
|
|
|
|
|
2023-05-12 10:54:09 +00:00
|
|
|
cargoSha256 = "sha256-AO5nSgQYvTmohXbzjWvDylnBgS2WpKP6wFOnkUx7ksI=";
|
2022-10-30 19:37:20 +00:00
|
|
|
buildAndTestSubdir = "extension";
|
|
|
|
|
2023-05-12 10:54:09 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests = {
|
|
|
|
timescaledb_toolkit = nixosTests.timescaledb;
|
|
|
|
};
|
2022-10-31 08:21:18 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 19:37:20 +00:00
|
|
|
# tests take really long
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Provide additional tools to ease all things analytic when using TimescaleDB";
|
|
|
|
homepage = "https://github.com/timescale/timescaledb-toolkit";
|
|
|
|
maintainers = with maintainers; [ typetetris ];
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
|
|
|
# as it needs to be used with timescaledb, simply use the condition from there
|
2023-05-25 22:27:35 +00:00
|
|
|
broken = versionOlder postgresql.version "12" || stdenv.isDarwin;
|
2022-10-30 19:37:20 +00:00
|
|
|
};
|
|
|
|
}
|