nixpkgs/pkgs/servers/sql/postgresql/timescaledb/default.nix

37 lines
1011 B
Nix
Raw Normal View History

2017-09-19 00:42:16 +01:00
{ stdenv, fetchFromGitHub, postgresql }:
2017-09-29 11:16:17 +01:00
# # To enable on NixOS:
# config.services.postgresql = {
# extraPlugins = [ pkgs.timescaledb ];
# extraConfig = "shared_preload_libraries = 'timescaledb'";
# }
2017-09-19 00:42:16 +01:00
stdenv.mkDerivation rec {
name = "timescaledb-${version}";
2017-11-05 18:33:13 +00:00
version = "0.6.0";
2017-09-19 00:42:16 +01:00
buildInputs = [ postgresql ];
src = fetchFromGitHub {
owner = "timescale";
repo = "timescaledb";
rev = version;
2017-11-05 18:33:13 +00:00
sha256 = "061z1ll3x7ca7fj12rl2difkdvmqykksqhpsql552qkkylg7iq4d";
2017-09-19 00:42:16 +01:00
};
installPhase = ''
mkdir -p $out/bin
install -D timescaledb.so -t $out/lib
install -D timescaledb.control -t $out/share/extension
cp -dpR sql/* $out/share/extension/
2017-09-19 00:42:16 +01:00
'';
meta = with stdenv.lib; {
2017-09-29 11:16:17 +01:00
description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
2017-09-19 00:42:16 +01:00
homepage = https://www.timescale.com/;
maintainers = with maintainers; [ volth ];
platforms = platforms.linux;
license = licenses.postgresql;
};
}