timescaledb: 0.6.0 -> 0.9.1

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2018-04-02 02:40:07 -05:00
parent 333245e852
commit 6ac2b11d13

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, postgresql }: { stdenv, fetchFromGitHub, cmake, postgresql }:
# # To enable on NixOS: # # To enable on NixOS:
# config.services.postgresql = { # config.services.postgresql = {
@ -8,29 +8,37 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "timescaledb-${version}"; name = "timescaledb-${version}";
version = "0.6.0"; version = "0.9.1";
nativeBuildInputs = [ cmake ];
buildInputs = [ postgresql ]; buildInputs = [ postgresql ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "timescale"; owner = "timescale";
repo = "timescaledb"; repo = "timescaledb";
rev = version; rev = "refs/tags/${version}";
sha256 = "061z1ll3x7ca7fj12rl2difkdvmqykksqhpsql552qkkylg7iq4d"; sha256 = "00k8fk5a1xpv9nxlmafnngk31wh80h6m72vsl1hnyq7nhby7ylic";
}; };
installPhase = '' # Fix the install phase which tries to install into the pgsql extension dir,
mkdir -p $out/bin # and cannot be manually overridden. This is rather fragile but works OK.
install -D timescaledb.so -t $out/lib patchPhase = ''
install -D timescaledb.control -t $out/share/extension for x in CMakeLists.txt sql/CMakeLists.txt; do
cp -dpR sql/* $out/share/extension/ 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; { meta = with stdenv.lib; {
description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space"; description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
homepage = https://www.timescale.com/; homepage = https://www.timescale.com/;
maintainers = with maintainers; [ volth ]; maintainers = with maintainers; [ volth ];
platforms = platforms.linux; platforms = platforms.linux;
license = licenses.postgresql; license = licenses.postgresql;
}; };
} }