mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-28 03:56:48 +03:00
* Use buildEnv with a postBuild hook rather than buildEnvScript.
svn path=/nixos/trunk/; revision=24593
This commit is contained in:
parent
4858ab9da8
commit
cf84a44272
1 changed files with 9 additions and 15 deletions
|
@ -9,22 +9,16 @@ let
|
|||
# see description of extraPlugins
|
||||
postgresqlAndPlugins = pg:
|
||||
if cfg.extraPlugins == [] then pg
|
||||
else pkgs.runCommand "postgresql-and-plugins" {
|
||||
inherit (pkgs) perl;
|
||||
inherit pg;
|
||||
# used by env builder:
|
||||
else pkgs.buildEnv {
|
||||
name = "postgresql-and-plugins";
|
||||
paths = [ pg ] ++ cfg.extraPlugins;
|
||||
pathsToLink = "/";
|
||||
ignoreCollisions = 0;
|
||||
manifest = null;
|
||||
}
|
||||
''
|
||||
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}
|
||||
'';
|
||||
postBuild =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
rm $out/bin/{pg_config,postgres,pg_ctl}
|
||||
cp --target-directory=$out/bin ${pg}/bin/{postgres,pg_config,pg_ctl}
|
||||
'';
|
||||
};
|
||||
|
||||
postgresql = postgresqlAndPlugins pkgs.postgresql;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue