2024-09-17 20:55:33 +01:00
|
|
|
{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm, buildPostgresqlExtension }:
|
2024-03-01 09:58:36 +00:00
|
|
|
|
2024-09-17 20:55:33 +01:00
|
|
|
buildPostgresqlExtension (finalAttrs: {
|
2024-03-01 09:58:36 +00:00
|
|
|
pname = "postgresql_anonymizer";
|
|
|
|
|
2024-03-13 13:36:20 +00:00
|
|
|
inherit (pg-dump-anon) version src passthru;
|
2024-03-01 09:58:36 +00:00
|
|
|
|
2024-03-02 13:04:06 +00:00
|
|
|
nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm;
|
2024-03-01 09:58:36 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2024-09-17 20:55:33 +01:00
|
|
|
# Needs to be after postInstall, where removeNestedNixStore runs
|
|
|
|
preFixup = ''
|
2024-03-13 13:36:20 +00:00
|
|
|
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
|
|
|
|
'';
|
2024-03-01 09:58:36 +00:00
|
|
|
|
2024-03-19 11:25:48 +00:00
|
|
|
meta = lib.getAttrs [ "homepage" "maintainers" "license" ] pg-dump-anon.meta // {
|
2024-03-14 08:50:46 +00:00
|
|
|
description = "Extension to mask or replace personally identifiable information (PII) or commercially sensitive data from a PostgreSQL database";
|
2024-03-01 09:58:36 +00:00
|
|
|
};
|
|
|
|
})
|