1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/servers/sql/postgresql/ext/anonymizer.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
852 B
Nix
Raw Normal View History

{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm, buildPostgresqlExtension }:
buildPostgresqlExtension (finalAttrs: {
pname = "postgresql_anonymizer";
inherit (pg-dump-anon) version src passthru;
nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm;
strictDeps = true;
# 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
'';
meta = lib.getAttrs [ "homepage" "maintainers" "license" ] pg-dump-anon.meta // {
description = "Extension to mask or replace personally identifiable information (PII) or commercially sensitive data from a PostgreSQL database";
};
})