3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #64027 from ehamberg/fix-postgres-ext-dirs

Install postgresql extensions under `$out/share/postgresql`
This commit is contained in:
Matthew Bauer 2019-07-01 11:54:10 -04:00 committed by GitHub
commit eea33299ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 33 additions and 33 deletions

View file

@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{lib,share/extension}
cp *.so $out/lib
cp *.sql $out/share/extension
cp *.control $out/share/extension
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
installPhase = ''
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
install -D -t $out/lib src/monitor/pgautofailover.so
install -D -t $out/share/extension src/monitor/*.sql
install -D -t $out/share/extension src/monitor/pgautofailover.control
install -D -t $out/share/postgresql/extension src/monitor/*.sql
install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control
'';
meta = with stdenv.lib; {

View file

@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{lib,share/extension}
cp *.so $out/lib
cp *.sql $out/share/extension
cp *.control $out/share/extension
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{lib,share/extension}
cp *.so $out/lib
cp *.sql $out/share/extension
cp *.control $out/share/extension
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{lib,share/extension}
cp *.so $out/lib
cp *.sql $out/share/extension
cp *.control $out/share/extension
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
mkdir -p $out/{lib,share/extension}
cp src/*.so $out/lib
cp updates/* $out/share/extension
cp -r sql/* $out/share/extension
cp *.control $out/share/extension
cp updates/* $out/share/postgresql/extension
cp -r sql/* $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
installPhase = ''
install -D bin/pg_repack -t $out/bin/
install -D lib/pg_repack.so -t $out/lib/
install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/extension
install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation {
installPhase = ''
mkdir -p $out/bin # for buildEnv to setup proper symlinks
install -D pg_similarity.so -t $out/lib/
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/extension
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension
'';
meta = {

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{lib,share/extension}
cp *.so $out/lib
cp *.sql $out/share/extension
cp *.control $out/share/extension
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
buildPhase = ":";
installPhase = ''
mkdir -p $out/bin # current postgresql extension mechanism in nixos requires bin directory
mkdir -p $out/share/extension
cp pg*sql *.control $out/share/extension
mkdir -p $out/share/postgresql/extension
cp pg*sql *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D pgroonga.so -t $out/lib/
install -D ./{pgroonga-*.sql,pgroonga.control} -t $out/share/extension
install -D ./{pgroonga-*.sql,pgroonga.control} -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin # for buildEnv, see https://github.com/NixOS/nixpkgs/issues/22653
install -D lib/*.so -t $out/lib
install -D sql/pgrouting--${version}.sql -t $out/share/extension
install -D sql/common/pgrouting.control -t $out/share/extension
install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension
install -D sql/common/pgrouting.control -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ];
installPhase = ''
install -D {sql/pgtap--${version}.sql,pgtap.control} -t $out/share/extension
install -D {sql/pgtap--${version}.sql,pgtap.control} -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D -t $out/lib/ pipelinedb.so
install -D -t $out/share/extension {pipelinedb-*.sql,pipelinedb.control}
install -D -t $out/share/postgresql/extension {pipelinedb-*.sql,pipelinedb.control}
'';
meta = with stdenv.lib; {

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D plv8*.so -t $out/lib
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/extension
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -31,9 +31,9 @@ stdenv.mkDerivation rec {
preConfigure = ''
sed -i 's@/usr/bin/file@${file}/bin/file@' configure
configureFlags="--datadir=$out/share --datarootdir=$out/share --bindir=$out/bin --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev}"
configureFlags="--datadir=$out/share/postgresql --datarootdir=$out/share/postgresql --bindir=$out/bin --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev}"
makeFlags="PERL=${perl}/bin/perl datadir=$out/share pkglibdir=$out/lib bindir=$out/bin"
makeFlags="PERL=${perl}/bin/perl datadir=$out/share/postgresql pkglibdir=$out/lib bindir=$out/bin"
'';
postConfigure = ''
sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ;

View file

@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
installPhase = ''
install -D tds_fdw.so -t $out/lib
install -D sql/tds_fdw--${version}.sql -t $out/share/extension
install -D tds_fdw.control -t $out/share/extension
install -D sql/tds_fdw--${version}.sql -t $out/share/postgresql/extension
install -D tds_fdw.control -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{bin,lib,share/extension}
cp *.so $out/lib
cp *.sql $out/share/extension
cp *.control $out/share/extension
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
'';
meta = with stdenv.lib; {

View file

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
patchPhase = ''
for x in CMakeLists.txt sql/CMakeLists.txt; do
substituteInPlace "$x" \
--replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/extension\""
--replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/postgresql/extension\""
done
for x in src/CMakeLists.txt src/loader/CMakeLists.txt tsl/src/CMakeLists.txt; do

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D tsearch_extras.so -t $out/lib/
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/extension
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {