diff options
author | Austin Seipp <aseipp@pobox.com> | 2018-04-02 02:40:07 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2018-04-02 03:36:07 -0500 |
commit | 6ac2b11d13d94319dceaa9dc57053714e5f824a8 (patch) | |
tree | be6e525182152c1161e62e4f208a22db599bfe00 /pkgs/servers | |
parent | 333245e85225a705e8248575b4c224f4ff8cc418 (diff) | |
download | nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.tar nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.tar.gz nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.tar.bz2 nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.tar.lz nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.tar.xz nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.tar.zst nixlib-6ac2b11d13d94319dceaa9dc57053714e5f824a8.zip |
timescaledb: 0.6.0 -> 0.9.1
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/sql/postgresql/timescaledb/default.nix | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/pkgs/servers/sql/postgresql/timescaledb/default.nix b/pkgs/servers/sql/postgresql/timescaledb/default.nix index 223bd6e470b9..e1a4aed3b7e4 100644 --- a/pkgs/servers/sql/postgresql/timescaledb/default.nix +++ b/pkgs/servers/sql/postgresql/timescaledb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, postgresql }: +{ stdenv, fetchFromGitHub, cmake, postgresql }: # # To enable on NixOS: # config.services.postgresql = { @@ -8,29 +8,37 @@ stdenv.mkDerivation rec { name = "timescaledb-${version}"; - version = "0.6.0"; + version = "0.9.1"; + nativeBuildInputs = [ cmake ]; buildInputs = [ postgresql ]; src = fetchFromGitHub { - owner = "timescale"; - repo = "timescaledb"; - rev = version; - sha256 = "061z1ll3x7ca7fj12rl2difkdvmqykksqhpsql552qkkylg7iq4d"; + owner = "timescale"; + repo = "timescaledb"; + rev = "refs/tags/${version}"; + sha256 = "00k8fk5a1xpv9nxlmafnngk31wh80h6m72vsl1hnyq7nhby7ylic"; }; - 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/ + # 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/; + homepage = https://www.timescale.com/; maintainers = with maintainers; [ volth ]; - platforms = platforms.linux; - license = licenses.postgresql; + platforms = platforms.linux; + license = licenses.postgresql; }; } |