Skip to content

Commit 77f2e57

Browse files
committed
Revert "refactor(groonga): move groonga package to pgroonga extension"
This reverts commit cfa9bcb92219f391469ae743f95c8856b0a99561.
1 parent 408d7de commit 77f2e57

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

nix/checks.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
start-postgres-server-bin
173173
which
174174
getkey-script
175+
supabase-groonga
175176
python3
176177
netcat
177178
];
@@ -257,7 +258,7 @@
257258
export HTTP_MOCK_PORT
258259
259260
#First we need to create a generic pg cluster for pgtap tests and run those
260-
export GRN_PLUGINS_DIR=${pgroonga.passthru.groonga}/lib/groonga/plugins
261+
export GRN_PLUGINS_DIR=${pkgs.supabase-groonga}/lib/groonga/plugins
261262
PGTAP_CLUSTER=$(mktemp -d)
262263
log info "Creating temporary PostgreSQL cluster at $PGTAP_CLUSTER"
263264
log_cmd initdb --locale=C --username=supabase_admin -D "$PGTAP_CLUSTER"

nix/ext/pgroonga/default.nix

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99
makeWrapper,
1010
xxHash,
1111
buildEnv,
12+
supabase-groonga,
1213
mecab-naist-jdic,
13-
callPackage,
1414
}:
1515
let
16-
# Import groonga locally since it's only used by pgroonga
17-
supabase-groonga = callPackage ./groonga.nix { };
18-
1916
pname = "pgroonga";
2017

2118
# Load version configuration from external file
@@ -174,13 +171,7 @@ buildEnv {
174171
'';
175172

176173
passthru = {
177-
inherit
178-
versions
179-
numberOfVersions
180-
pname
181-
supabase-groonga
182-
;
183-
groonga = supabase-groonga;
174+
inherit versions numberOfVersions pname;
184175
version =
185176
"multi-" + lib.concatStringsSep "-" (map (v: lib.replaceStrings [ "." ] [ "-" ] v) versions);
186177
};

nix/ext/tests/pgroonga.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ self.inputs.nixpkgs.lib.nixos.runTest {
8484
self.packages.${pkgs.system}.mecab-naist-jdic
8585
}/lib/mecab/dic/naist-jdic";
8686
systemd.services.postgresql.environment.MECAB_CONFIG = "${pkgs.mecab}/bin/mecab-config";
87-
systemd.services.postgresql.environment.GRN_PLUGINS_DIR =
88-
"${(installedExtension "15").passthru.groonga}/lib/groonga/plugins";
87+
systemd.services.postgresql.environment.GRN_PLUGINS_DIR = "${
88+
self.packages.${pkgs.system}.supabase-groonga
89+
}/lib/groonga/plugins";
8990

9091
specialisation.postgresql17.configuration = {
9192
services.postgresql = {

nix/overlays/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
postgresql_15
1111
postgresql_17
1212
postgresql_orioledb-17
13-
13+
supabase-groonga
1414
switch-ext-version
1515
mecab-naist-jdic
1616
;

nix/packages/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
github-matrix = pkgs.callPackage ./github-matrix {
4242
nix-eval-jobs = inputs'.nix-eval-jobs.packages.default;
4343
};
44-
44+
supabase-groonga = pkgs.callPackage ../ext/pgroonga/groonga.nix { };
4545
http-mock-server = pkgs.callPackage ./http-mock-server.nix { };
4646
local-infra-bootstrap = pkgs.callPackage ./local-infra-bootstrap.nix { };
4747
mecab-naist-jdic = pkgs.callPackage ./mecab-naist-jdic.nix { };

nix/packages/lib.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
psql_15,
44
psql_orioledb-17,
55
defaults,
6+
supabase-groonga,
67
system,
78
}:
89
{
@@ -14,7 +15,6 @@
1415
extraSubstitutions ? { },
1516
}:
1617
let
17-
supabase-groonga = pgroonga.passthru.groonga or (pkgs.callPackage ../ext/pgroonga/groonga.nix { });
1818
paths = {
1919
migrationsDir = builtins.path {
2020
name = "migrations";

0 commit comments

Comments
 (0)