mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
e03acfe161
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/timescaledb/versions. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 0.9.2 with grep in /nix/store/m28fll152hk6ik9fiz2jy66qccjxklq3-timescaledb-0.9.2 - directory tree listing: https://gist.github.com/a922008862652d9f3c6f2e2a678c4c71 - du listing: https://gist.github.com/8c5a0a1374fbb013168d4197d67ba214
45 lines
1.4 KiB
Nix
45 lines
1.4 KiB
Nix
{ stdenv, fetchFromGitHub, cmake, postgresql }:
|
|
|
|
# # To enable on NixOS:
|
|
# config.services.postgresql = {
|
|
# extraPlugins = [ pkgs.timescaledb ];
|
|
# extraConfig = "shared_preload_libraries = 'timescaledb'";
|
|
# }
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "timescaledb-${version}";
|
|
version = "0.9.2";
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ postgresql ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "timescale";
|
|
repo = "timescaledb";
|
|
rev = "refs/tags/${version}";
|
|
sha256 = "1zgyd407skqbsw2zj3l9hixwlisnj82yb6hbq5khjg9k0ifvvgyp";
|
|
};
|
|
|
|
# Fix the install phase which tries to install into the pgsql extension dir,
|
|
# and cannot be manually overridden. This is rather fragile but works OK.
|
|
patchPhase = ''
|
|
for x in CMakeLists.txt sql/CMakeLists.txt; do
|
|
substituteInPlace "$x" \
|
|
--replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/extension\""
|
|
done
|
|
|
|
for x in src/CMakeLists.txt src/loader/CMakeLists.txt; do
|
|
substituteInPlace "$x" \
|
|
--replace 'DESTINATION ''${PG_PKGLIBDIR}' "DESTINATION \"$out/lib\""
|
|
done
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
|
|
homepage = https://www.timescale.com/;
|
|
maintainers = with maintainers; [ volth ];
|
|
platforms = platforms.linux;
|
|
license = licenses.postgresql;
|
|
};
|
|
}
|