Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions nix/ext/timescaledb.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, enableUnfree ? true }:
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5 }:

stdenv.mkDerivation rec {
pname = "timescaledb${lib.optionalString (!enableUnfree) "-apache"}";
pname = "timescaledb-apache";
version = "2.16.1";

nativeBuildInputs = [ cmake ];
Expand All @@ -14,8 +14,7 @@ stdenv.mkDerivation rec {
hash = "sha256-sLxWdBmih9mgiO51zLLxn9uwJVYc5JVHJjSWoADoJ+w=";
};

cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" ]
++ lib.optionals (!enableUnfree) [ "-DAPACHE_ONLY=ON" ]
cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" "-DAPACHE_ONLY=1" ]
++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ];

# Fix the install phase which tries to install into the pgsql extension dir,
Expand All @@ -38,7 +37,7 @@ stdenv.mkDerivation rec {
changelog = "https://github.com/timescale/timescaledb/blob/${version}/CHANGELOG.md";
maintainers = with maintainers; [ samrose ];
platforms = postgresql.meta.platforms;
license = with licenses; if enableUnfree then tsl else asl20;
license = licenses.asl20;
broken = versionOlder postgresql.version "13";
};
}
7 changes: 7 additions & 0 deletions nix/tests/expected/timescale.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-- Confirm we're running the apache version
show timescaledb.license;
timescaledb.license
---------------------
apache
(1 row)

-- Create schema v
create schema v;
-- Create a table in the v schema
Expand Down
3 changes: 3 additions & 0 deletions nix/tests/sql/timescale.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
-- Confirm we're running the apache version
show timescaledb.license;

-- Create schema v
create schema v;

Expand Down
Loading