Skip to content

Commit 2dda773

Browse files
authored
Update timescale derivation to disallow non-apache configs (#1232)
* update timescale derivation to disallow non-apache configs * remove enableUnfree flag
1 parent 9b5146e commit 2dda773

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Diff for: nix/ext/timescaledb.nix

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, enableUnfree ? true }:
1+
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5 }:
22

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

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

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

2120
# Fix the install phase which tries to install into the pgsql extension dir,
@@ -38,7 +37,7 @@ stdenv.mkDerivation rec {
3837
changelog = "https://github.com/timescale/timescaledb/blob/${version}/CHANGELOG.md";
3938
maintainers = with maintainers; [ samrose ];
4039
platforms = postgresql.meta.platforms;
41-
license = with licenses; if enableUnfree then tsl else asl20;
40+
license = licenses.asl20;
4241
broken = versionOlder postgresql.version "13";
4342
};
4443
}

Diff for: nix/tests/expected/timescale.out

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
-- Confirm we're running the apache version
2+
show timescaledb.license;
3+
timescaledb.license
4+
---------------------
5+
apache
6+
(1 row)
7+
18
-- Create schema v
29
create schema v;
310
-- Create a table in the v schema

Diff for: nix/tests/sql/timescale.sql

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Confirm we're running the apache version
2+
show timescaledb.license;
3+
14
-- Create schema v
25
create schema v;
36

0 commit comments

Comments
 (0)