
This is only tested on native builds against the output of the original pg_config, which should be enough.
29 lines
554 B
Nix
29 lines
554 B
Nix
{
|
|
diffutils,
|
|
lib,
|
|
replaceVarsWith,
|
|
runtimeShell,
|
|
stdenv,
|
|
# PostgreSQL package
|
|
finalPackage,
|
|
}:
|
|
|
|
replaceVarsWith {
|
|
name = "pg_config";
|
|
src = ./pg_config.sh;
|
|
dir = "bin";
|
|
isExecutable = true;
|
|
replacements = {
|
|
inherit runtimeShell;
|
|
postgresql-dev = lib.getDev finalPackage;
|
|
};
|
|
nativeCheckInputs = [
|
|
diffutils
|
|
];
|
|
postCheck = ''
|
|
if [ -e ${lib.getDev finalPackage}/nix-support/pg_config.expected ]; then
|
|
diff ${lib.getDev finalPackage}/nix-support/pg_config.expected <($out/bin/pg_config)
|
|
fi
|
|
'';
|
|
}
|