1 /* Hydra job to build a tarball for Nixpkgs from a SVN checkout. It
2 also builds the documentation and tests whether the Nix expressions
5 { nixpkgs ? {outPath = (import ./all-packages.nix {}).lib.cleanSource ../..; rev = 1234;}
6 , officialRelease ? false
9 with import nixpkgs.outPath {};
11 releaseTools.makeSourceTarball {
12 name = "nixpkgs-tarball";
14 inherit officialRelease;
18 libxml2 # Needed for the release notes.
21 nix # Needed to check whether the expressions are valid.
27 releaseName=nixpkgs-$(cat $src/VERSION)$VERSION_SUFFIX
28 echo "release name is $releaseName"
29 echo $releaseName > relname
35 echo "building docs..."
36 export VARTEXFONTS=$TMPDIR/texfonts
37 make -C doc docbookxsl=${docbook5_xsl}/xml/xsl/docbook
38 ln -s doc/NEWS.txt NEWS
44 # Run the regression tests in `lib'.
45 res="$(nix-instantiate --eval-only --strict pkgs/lib/tests.nix)"
46 if test "$res" != "[ ]"; then
47 echo "regression tests for lib failed, got: $res"
51 # Check that all-packages.nix evaluates on a number of platforms.
52 for platform in i686-linux x86_64-linux powerpc-linux i686-freebsd powerpc-darwin i686-darwin; do
53 header "checking pkgs/top-level/all-packages.nix on $platform"
54 nix-env --readonly-mode -f pkgs/top-level/all-packages.nix \
55 --show-trace --argstr system "$platform" \
56 -qa \* --drv-path --system-filter \* --system --meta --xml
60 header "checking eval-release.nix"
61 nix-instantiate --eval-only --strict --xml ./maintainers/scripts/eval-release.nix > $TMPDIR/out.xml
62 xmllint --noout $TMPDIR/out.xml
67 find . -name "\.svn" -exec rm -rvf {} \; -prune
69 ensureDir $out/tarballs
71 cp -prd . ../$releaseName
72 (cd .. && tar cfa $out/tarballs/$releaseName.tar.bz2 $releaseName) || false
73 (cd .. && tar cfa $out/tarballs/$releaseName.tar.lzma $releaseName) || false
75 ensureDir $out/release-notes
76 cp doc/NEWS.html $out/release-notes/index.html
77 cp doc/style.css $out/release-notes/
78 echo "doc release-notes $out/release-notes" >> $out/nix-support/hydra-build-products
81 cp doc/manual.html $out/manual/index.html
82 cp doc/style.css $out/manual/
83 echo "doc manual $out/manual" >> $out/nix-support/hydra-build-products
85 cp doc/manual.pdf $out/manual.pdf
86 echo "doc-pdf manual $out/manual.pdf" >> $out/nix-support/hydra-build-products
90 maintainers = [ lib.maintainers.all ];