Merge pull request #58251 from marsam/postgresql-plugins-bin
postgresql: always create the bin directory in postgresqlAndPlugins
This commit is contained in:
commit
4a2375ce98
|
@ -12,10 +12,13 @@ let
|
||||||
else pkgs.buildEnv {
|
else pkgs.buildEnv {
|
||||||
name = "postgresql-and-plugins-${(builtins.parseDrvName pg.name).version}";
|
name = "postgresql-and-plugins-${(builtins.parseDrvName pg.name).version}";
|
||||||
paths = [ pg pg.lib ] ++ cfg.extraPlugins;
|
paths = [ pg pg.lib ] ++ cfg.extraPlugins;
|
||||||
|
# We include /bin to ensure the $out/bin directory is created which is
|
||||||
|
# needed because we'll be removing files from that directory in postBuild
|
||||||
|
# below. See #22653
|
||||||
|
pathsToLink = [ "/" "/bin" ];
|
||||||
buildInputs = [ pkgs.makeWrapper ];
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
postBuild =
|
postBuild =
|
||||||
''
|
''
|
||||||
mkdir -p $out/bin
|
|
||||||
rm $out/bin/{pg_config,postgres,pg_ctl}
|
rm $out/bin/{pg_config,postgres,pg_ctl}
|
||||||
cp --target-directory=$out/bin ${pg}/bin/{postgres,pg_config,pg_ctl}
|
cp --target-directory=$out/bin ${pg}/bin/{postgres,pg_config,pg_ctl}
|
||||||
wrapProgram $out/bin/postgres --set NIX_PGLIBDIR $out/lib
|
wrapProgram $out/bin/postgres --set NIX_PGLIBDIR $out/lib
|
||||||
|
|
|
@ -14,7 +14,6 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
|
|
||||||
mkdir -p $out/{lib,share/extension}
|
mkdir -p $out/{lib,share/extension}
|
||||||
|
|
||||||
cp *.so $out/lib
|
cp *.so $out/lib
|
||||||
|
|
|
@ -13,7 +13,6 @@ stdenv.mkDerivation {
|
||||||
buildInputs = [ postgresql gcc ];
|
buildInputs = [ postgresql gcc ];
|
||||||
buildPhase = "USE_PGXS=1 make";
|
buildPhase = "USE_PGXS=1 make";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin # for buildEnv to setup proper symlinks
|
|
||||||
install -D pg_similarity.so -t $out/lib/
|
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/postgresql/extension
|
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -13,7 +13,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildPhase = ":";
|
buildPhase = ":";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin # current postgresql extension mechanism in nixos requires bin directory
|
|
||||||
mkdir -p $out/share/postgresql/extension
|
mkdir -p $out/share/postgresql/extension
|
||||||
cp pg*sql *.control $out/share/postgresql/extension
|
cp pg*sql *.control $out/share/postgresql/extension
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -15,7 +15,6 @@ stdenv.mkDerivation rec {
|
||||||
makeFlags = [ "HAVE_MSGPACK=1" ];
|
makeFlags = [ "HAVE_MSGPACK=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D pgroonga.so -t $out/lib/
|
install -D pgroonga.so -t $out/lib/
|
||||||
install -D ./{pgroonga-*.sql,pgroonga.control} -t $out/share/postgresql/extension
|
install -D ./{pgroonga-*.sql,pgroonga.control} -t $out/share/postgresql/extension
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -15,7 +15,6 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin # for buildEnv, see https://github.com/NixOS/nixpkgs/issues/22653
|
|
||||||
install -D lib/*.so -t $out/lib
|
install -D lib/*.so -t $out/lib
|
||||||
install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension
|
install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension
|
||||||
install -D sql/common/pgrouting.control -t $out/share/postgresql/extension
|
install -D sql/common/pgrouting.control -t $out/share/postgresql/extension
|
||||||
|
|
|
@ -23,7 +23,6 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
|
|
||||||
install -D plv8*.so -t $out/lib
|
install -D plv8*.so -t $out/lib
|
||||||
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
|
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -36,13 +36,6 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# work around an annoying bug, by creating $out/bin, so buildEnv doesn't freak out later
|
|
||||||
# see https://github.com/NixOS/nixpkgs/issues/22653
|
|
||||||
|
|
||||||
mkdir -p $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
|
description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
|
||||||
homepage = https://www.timescale.com/;
|
homepage = https://www.timescale.com/;
|
||||||
|
|
|
@ -15,7 +15,6 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ postgresql ];
|
buildInputs = [ postgresql ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D tsearch_extras.so -t $out/lib/
|
install -D tsearch_extras.so -t $out/lib/
|
||||||
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
|
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue