* Include nix-prefetch-svn in the Hydra binary distribution.

* Be very strict about $PATH so that we don't get surprises about
  missing programs.
This commit is contained in:
Eelco Dolstra 2008-11-28 23:44:17 +00:00
parent acc2c30eb8
commit f6fcbf9245

View file

@ -73,20 +73,30 @@ let
src=$(ls ${tarball.path}/tarballs/*.tar.bz2) src=$(ls ${tarball.path}/tarballs/*.tar.bz2)
''; # */ ''; # */
hydraPath = stdenv.lib.concatStringsSep ":" (map (p: "${p}/bin") [
libxslt sqlite subversion nixUnstable coreutils
gzip bzip2 gnused
]);
installPhase = '' installPhase = ''
ensureDir $out/libexec ensureDir $out/libexec
cp -prd src/Hydra $out/libexec/hydra cp -prd src/Hydra $out/libexec/hydra
mv $out/libexec/hydra/script $out/bin mv $out/libexec/hydra/script $out/bin
cp ${nixpkgs.path + "/pkgs/build-support/fetchsvn/nix-prefetch-svn"} $out/bin/nix-prefetch-svn
for i in $out/bin/*; do for i in $out/bin/*; do
wrapProgram $i \ wrapProgram $i \
--prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \
--prefix PATH ':' $out/bin:${libxslt}/bin:${sqlite}/bin \ --set PATH $out/bin:$hydraPath \
--set HYDRA_HOME $out/libexec/hydra --set HYDRA_HOME $out/libexec/hydra
done done
''; # */ ''; # */
meta = {
description = "Build of Hydra on ${system}";
};
}; };
}; };