* Use buildEnv with a postBuild hook rather than buildEnvScript.

svn path=/nixos/trunk/; revision=24593
This commit is contained in:
Eelco Dolstra 2010-11-03 22:37:39 +00:00
parent 4858ab9da8
commit cf84a44272

View File

@ -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;