postgresqlPackages.plv8: install all files
Previously, the update complained due to missing migration files: db=# alter extension plv8 update to '2.3.15'; ERROR: extension "plv8" has no update path from version "2.3.13" to version "2.3.15" Now it fails for a different reason: db=# alter extension plv8 update to '2.3.15'; ERROR: could not access file "$libdir/plv8-2.3.13": No such file or directory Changing installation directory using DESTDIR is an ugly hack that might backfire but PGXS does not currently seem to allow overriding the installation directory.
This commit is contained in:
@@ -18,13 +18,21 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildFlags = [ "all" ];
|
||||
|
||||
installFlags = [
|
||||
# PGXS only supports installing to postgresql prefix so we need to redirect this
|
||||
"DESTDIR=${placeholder "out"}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./generate_upgrade.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D plv8*.so -t $out/lib
|
||||
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
|
||||
postInstall = ''
|
||||
# Move the redirected to proper directory.
|
||||
# There appear to be no references to the install directories
|
||||
# so changing them does not cause issues.
|
||||
mv "$out/nix/store"/*/* "$out"
|
||||
rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user