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Q54ZEQZ3KVZ22YCLDCJ6FRYRAC
NUIKDEHLDR4ANFZFRCWBAWZGFVMHCZ7PSMPPFVQJ3AAAAWAQQD4AC
DFXIN6YWMMN7BTJSSFVTFUMR4OKPAKNQF6PRBUC4BWXUFLZSQRDAC
3MDDGGSNFREV5XNTUFURNPXOMDS6KSM2MMKXRMS37ECNFNPMHGZQC
JTRG7RDQXKPSO4ESGDLSVAT5WIFGKDL424MN6YYCVTKCOR2FTXRQC
3R5SCBEJYV7JWFUHCY7AGHEO2ZAUZR5AE2E4FL7JBQ6E43FJT6IQC
T2232OBSNVDGHY46RY5BBB2IET5LV5OLKSSBDYUF7KAEDBUOTC7QC
VHYWSRISYUZOFS3ZEI3TSQJCSPRXORA7TPT2LDHLKLDSIT3TOPFQC
tarball =
{ hydraSrc ? {outPath = ./.; rev = 1234;}
, nixpkgs ? ../nixpkgs
, officialRelease ? false
}:
releaseTools.makeSourceTarball {
name = "hydra-tarball";
version = "0.1";
src = hydraSrc;
inherit officialRelease;
releaseTools.makeSourceTarball {
name = "hydra-tarball";
version = "0.1";
src = hydraSrc;
inherit officialRelease;
jquery = fetchurl {
url = http://jqueryui.com/download/jquery-ui-1.7.2.custom.zip;
sha256 = "1l9dwaaqvdysmzlkg1vb8j0s0xn63d475gh53pjjwxw85668krdh";
};
jquery = fetchurl {
url = http://jqueryui.com/download/jquery-ui-1.7.2.custom.zip;
sha256 = "1l9dwaaqvdysmzlkg1vb8j0s0xn63d475gh53pjjwxw85668krdh";
};
flot = fetchurl {
url = http://flot.googlecode.com/files/flot-0.6.zip;
sha256 = "1k2mfijvr1jwga65wcd78lp9ia17v99f1cfm5nlmc0k8glllbj5a";
};
tablesorter = fetchurl {
url = http://tablesorter.com/jquery.tablesorter.zip;
sha256 = "013zgglvifvy0yg0ybjrl823sswy9v1ihf5nmighmcyigfd6nrhb";
};
# Since we don't have a `make dist', just tar everything.
distPhase = ''
ensureDir src/root/static/js/jquery
unzip -d src/root/static/js/jquery $jquery
rm -rf src/root/static/js/tablesorter
unzip -d src/root/static/js $tablesorter
unzip -d src/root/static/js $flot
# Since we don't have a `make dist', just tar everything.
distPhase = ''
ensureDir src/root/static/js/jquery
unzip -d src/root/static/js/jquery $jquery
rm -rf src/root/static/js/tablesorter
unzip -d src/root/static/js $tablesorter
unzip -d src/root/static/js $flot
releaseName=hydra-0.1$VERSION_SUFFIX;
ensureDir $out/tarballs
mkdir ../$releaseName
cp -prd . ../$releaseName
cd ..
tar cfj $out/tarballs/$releaseName.tar.bz2 $releaseName
tar cfz $out/tarballs/$releaseName.tar.gz $releaseName
zip -9r $out/tarballs/$releaseName.zip $releaseName
'';
};
make -C src/sql
releaseName=hydra-0.1$VERSION_SUFFIX;
ensureDir $out/tarballs
mkdir ../$releaseName
cp -prd . ../$releaseName
cd ..
tar cfj $out/tarballs/$releaseName.tar.bz2 $releaseName
tar cfz $out/tarballs/$releaseName.tar.gz $releaseName
zip -9r $out/tarballs/$releaseName.zip $releaseName
'';
};
build =
{ system ? "x86_64-linux" }:
preUnpack = ''
src=$(ls ${tarball}/tarballs/*.tar.bz2)
''; # */
hydraPath = stdenv.lib.concatStringsSep ":" (map (p: "${p}/bin") ( [
libxslt sqlite subversion openssh nix coreutils findutils
gzip bzip2 lzma gnutar unzip git
gnused graphviz
] ++ ( if stdenv.isLinux then [rpm dpkg cdrkit] else [] )));
hydraPath = stdenv.lib.concatStringsSep ":" (map (p: "${p}/bin") ( [
libxslt sqlite subversion openssh nix coreutils findutils
gzip bzip2 lzma gnutar unzip git
gnused graphviz
] ++ ( if stdenv.isLinux then [rpm dpkg cdrkit] else [] )));
installPhase = ''
ensureDir $out/nix-support
installPhase = ''
ensureDir $out/nix-support
ensureDir $out/libexec
cp -prd src $out/libexec/hydra
ensureDir $out/libexec
cp -prd src $out/libexec/hydra
cp ${"${nixpkgs}/pkgs/build-support/fetchsvn/nix-prefetch-svn"} $out/bin/nix-prefetch-svn
cp ${"${nixpkgs}/pkgs/build-support/fetchgit/nix-prefetch-git"} $out/bin/nix-prefetch-git
cp ${"${nixpkgs}/pkgs/build-support/fetchsvn/nix-prefetch-svn"} $out/bin/nix-prefetch-svn
cp ${"${nixpkgs}/pkgs/build-support/fetchgit/nix-prefetch-git"} $out/bin/nix-prefetch-git
for i in $out/bin/*; do
wrapProgram $i \
--prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \
--prefix PATH ':' $out/bin:$hydraPath \
--set HYDRA_HOME $out/libexec/hydra \
--set HYDRA_RELEASE ${tarball.version} \
--set NIX_RELEASE ${nix.name}
done
for i in $out/bin/*; do
wrapProgram $i \
--prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \
--prefix PATH ':' $out/bin:$hydraPath \
--set HYDRA_HOME $out/libexec/hydra \
--set HYDRA_RELEASE ${tarball.version} \
--set NIX_RELEASE ${nix.name}
done
ensureDir $out/share/doc/hydra/manual
cp doc/manual/* $out/share/doc/hydra/manual/
ln -s manual.html $out/share/doc/hydra/manual/index.html
echo "doc manual $out/share/doc/hydra/manual" >> $out/nix-support/hydra-build-products
echo "nix-build none $out" >> $out/nix-support/hydra-build-products
''; # */
ensureDir $out/share/doc/hydra/manual
cp doc/manual/* $out/share/doc/hydra/manual/
ln -s manual.html $out/share/doc/hydra/manual/index.html
echo "doc manual $out/share/doc/hydra/manual" >> $out/nix-support/hydra-build-products
echo "nix-build none $out" >> $out/nix-support/hydra-build-products
''; # */