{pg-dump-anon,postgresql.pkgs.anonymizer}: 1.3.2 -> 2.4.1 (#445784)
This commit is contained in:
@@ -39,7 +39,7 @@ let
|
||||
create table player(id serial, name text, points int);
|
||||
insert into player(id,name,points) values (1,'Foo', 23);
|
||||
insert into player(id,name,points) values (2,'Bar',42);
|
||||
security label for anon on column player.name is 'MASKED WITH FUNCTION anon.fake_last_name();';
|
||||
security label for anon on column player.name is 'MASKED WITH FUNCTION anon.fake_last_name()';
|
||||
security label for anon on column player.points is 'MASKED WITH VALUE NULL';
|
||||
''}"
|
||||
)
|
||||
@@ -61,7 +61,7 @@ let
|
||||
COPY public.player ...
|
||||
1,Shields,
|
||||
2,Salazar,
|
||||
\.
|
||||
\\.
|
||||
|
||||
in the given dump (the commas are tabs in case of pg_dump).
|
||||
Extract the CSV lines and split by `sep`.
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "pg-dump-anon";
|
||||
version = "1.3.2";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "dalibo";
|
||||
repo = "postgresql_anonymizer";
|
||||
rev = version;
|
||||
hash = "sha256-MGdGvd4P1fFKdd6wnS2V5Tdly6hJlAmSA4TspnO/6Tk=";
|
||||
tag = version;
|
||||
hash = "sha256-vAsKTkFx8HLKDdXIQt6fEF3l7EzzvcilGfqNtBa0AMM=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/pg_dump_anon";
|
||||
@@ -29,11 +30,11 @@ buildGoModule rec {
|
||||
--prefix PATH : ${lib.makeBinPath [ postgresql ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Export databases with data being anonymized with the anonymizer extension";
|
||||
homepage = "https://postgresql-anonymizer.readthedocs.io/en/stable/";
|
||||
teams = [ teams.flyingcircus ];
|
||||
license = licenses.postgresql;
|
||||
teams = [ lib.teams.flyingcircus ];
|
||||
license = lib.licenses.postgresql;
|
||||
mainProgram = "pg_dump_anon";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,4 +17,10 @@
|
||||
hash = "sha256-oMToAhKkRiCyC8JYS0gmo/XX3QVcVtF5mUV0aQjd+p8=";
|
||||
cargoHash = "sha256-RawGAQGtG2QVDCMbwjmUEaH6rDeRiBvvJsGCY8wySw0=";
|
||||
};
|
||||
|
||||
cargo-pgrx_0_16_0 = {
|
||||
version = "0.16.0";
|
||||
hash = "sha256-emNR7fXNVD9sY/Mdno7mwpH6l/7AD28cBUsFRn9je50=";
|
||||
cargoHash = "sha256-3eyBDWDoCzSU0tbab8qbjSnBkkN0oOgd7YbuyHLEHYw=";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,30 +1,25 @@
|
||||
{
|
||||
cargo-pgrx_0_16_0,
|
||||
jitSupport,
|
||||
lib,
|
||||
llvm,
|
||||
nixosTests,
|
||||
pg-dump-anon,
|
||||
postgresql,
|
||||
postgresqlBuildExtension,
|
||||
buildPgrxExtension,
|
||||
runtimeShell,
|
||||
}:
|
||||
|
||||
postgresqlBuildExtension {
|
||||
buildPgrxExtension {
|
||||
pname = "postgresql_anonymizer";
|
||||
|
||||
inherit (pg-dump-anon) version src;
|
||||
|
||||
nativeBuildInputs = lib.optional jitSupport llvm;
|
||||
inherit postgresql;
|
||||
cargo-pgrx = cargo-pgrx_0_16_0;
|
||||
cargoHash = "sha256-Z1uH6Z2qLV1Axr8dXqPznuEZcacAZnv11tb3lWBh1yw=";
|
||||
|
||||
# Needs to be after postInstall, where removeNestedNixStore runs
|
||||
preFixup = ''
|
||||
cat >$out/bin/pg_dump_anon.sh <<'EOF'
|
||||
#!${runtimeShell}
|
||||
echo "This script is deprecated by upstream. To use the new script,"
|
||||
echo "please install pkgs.pg-dump-anon."
|
||||
exit 1
|
||||
EOF
|
||||
'';
|
||||
# Tries to copy extension into postgresql's store path.
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests = nixosTests.postgresql.anonymizer.passthru.override postgresql;
|
||||
|
||||
|
||||
@@ -5589,6 +5589,7 @@ with pkgs;
|
||||
cargo-pgrx_0_12_0_alpha_1
|
||||
cargo-pgrx_0_12_6
|
||||
cargo-pgrx_0_14_1
|
||||
cargo-pgrx_0_16_0
|
||||
cargo-pgrx
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user