* Use buildEnv with a postBuild hook rather than buildEnvScript.
svn path=/nixos/trunk/; revision=24593
This commit is contained in:
parent
4858ab9da8
commit
cf84a44272
@ -9,22 +9,16 @@ let
|
|||||||
# see description of extraPlugins
|
# see description of extraPlugins
|
||||||
postgresqlAndPlugins = pg:
|
postgresqlAndPlugins = pg:
|
||||||
if cfg.extraPlugins == [] then pg
|
if cfg.extraPlugins == [] then pg
|
||||||
else pkgs.runCommand "postgresql-and-plugins" {
|
else pkgs.buildEnv {
|
||||||
inherit (pkgs) perl;
|
name = "postgresql-and-plugins";
|
||||||
inherit pg;
|
|
||||||
# used by env builder:
|
|
||||||
paths = [ pg ] ++ cfg.extraPlugins;
|
paths = [ pg ] ++ cfg.extraPlugins;
|
||||||
pathsToLink = "/";
|
postBuild =
|
||||||
ignoreCollisions = 0;
|
''
|
||||||
manifest = null;
|
mkdir -p $out/bin
|
||||||
}
|
rm $out/bin/{pg_config,postgres,pg_ctl}
|
||||||
''
|
cp --target-directory=$out/bin ${pg}/bin/{postgres,pg_config,pg_ctl}
|
||||||
perlScript=${pkgs.buildEnvScript}
|
'';
|
||||||
mkdir -p $out/bin
|
};
|
||||||
$perl/bin/perl $perlScript
|
|
||||||
rm $out/bin/{pg_config,postgres,pg_ctl}
|
|
||||||
cp --target-directory=$out/bin $pg/bin/{postgres,pg_config,pg_ctl}
|
|
||||||
'';
|
|
||||||
|
|
||||||
postgresql = postgresqlAndPlugins pkgs.postgresql;
|
postgresql = postgresqlAndPlugins pkgs.postgresql;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user