Skip to content

Commit e4a9904

Browse files
samrosestaaldraad
authored andcommitted
Revert "feat: package gatekeeper in this package set"
This reverts commit 1dfd426.
1 parent 5201968 commit e4a9904

File tree

4 files changed

+48
-47
lines changed

4 files changed

+48
-47
lines changed

flake.lock

Lines changed: 42 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@
2828
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
2929
nixpkgs-go124.url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0";
3030
nixpkgs-pgbackrest.url = "github:nixos/nixpkgs/nixos-unstable-small";
31-
gatekeeper-src = {
32-
url = "git+ssh://git@github.com/supabase/jit-db-gatekeeper?ref=sam/add-flake-parts&rev=34ba4a222c15b2480b837bbb3076508f36c9296f";
33-
flake = false;
34-
};
31+
gatekeeper.url = "git+ssh://git@github.com/supabase/jit-db-gatekeeper?ref=sam/add-flake-parts&rev=34ba4a222c15b2480b837bbb3076508f36c9296f";
32+
gatekeeper.inputs.nixpkgs.follows = "nixpkgs";
3533
};
3634

3735
outputs =

nix/overlays/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
(old.postInstall or "")
3636
+ ''
3737
mkdir -p $out/lib/security
38-
cp ${self.packages.${final.system}.gatekeeper}/lib/security/*.so $out/lib/security/
38+
cp ${final.gatekeeper}/lib/security/*.so $out/lib/security/
3939
'';
4040
});
4141
};

nix/packages/gatekeeper.nix

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,12 @@
11
{ inputs, ... }:
22
{
33
perSystem =
4-
{ system, pkgs, ... }:
4+
{ system, ... }:
55
let
6+
67
go124 = inputs.nixpkgs-go124.legacyPackages.${system}.go_1_24;
7-
# Use completely clean nixpkgs without any overlays for gatekeeper
8-
cleanPkgs = inputs.nixpkgs.legacyPackages.${system};
9-
buildGoModule = cleanPkgs.buildGoModule.override { go = go124; };
108
in
119
{
12-
packages.gatekeeper = buildGoModule {
13-
pname = "gatekeeper";
14-
version = "0.1.0";
15-
16-
src = inputs.gatekeeper-src;
17-
18-
vendorHash = "sha256-pdF+bhvZQwd2iSEHVtDAGihkYZGSaQaFdsF8MSrWuKQ=";
19-
20-
buildInputs =
21-
[ cleanPkgs.pam ]
22-
++ cleanPkgs.lib.optionals cleanPkgs.stdenv.isDarwin [
23-
cleanPkgs.darwin.apple_sdk.frameworks.Security
24-
];
25-
26-
buildPhase = ''
27-
runHook preBuild
28-
go build -buildmode=c-shared -o pam_jwt_pg.so
29-
runHook postBuild
30-
'';
31-
32-
installPhase = ''
33-
runHook preInstall
34-
mkdir -p $out/lib/security
35-
cp pam_jwt_pg.so $out/lib/security/
36-
runHook postInstall
37-
'';
38-
39-
meta = with pkgs.lib; {
40-
description = "PAM module for JWT authentication with PostgreSQL backend";
41-
homepage = "https://github.com/supabase/jit-db-gatekeeper";
42-
license = licenses.mit;
43-
platforms = platforms.unix;
44-
};
45-
};
10+
packages.gatekeeper = inputs.gatekeeper.lib.${system}.makeGatekeeper { go = go124; };
4611
};
4712
}

0 commit comments

Comments
 (0)