* Automatic generation and uploading of Nix source distributions
and manuals. svn path=/nixpkgs/trunk/; revision=546
This commit is contained in:
parent
306522dd90
commit
1bc488563d
21
nix-dist/build+upload.sh
Executable file
21
nix-dist/build+upload.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#! /bin/sh
|
||||
|
||||
url="https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/"
|
||||
|
||||
if ! rev=$(curl --silent -k https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/ \
|
||||
| grep '<h2>Revision' \
|
||||
| sed 's/.*Revision \(.*\):.*/\1/'); \
|
||||
then exit 1; fi
|
||||
|
||||
echo $rev > head-revision.nix
|
||||
|
||||
if ! storeexpr=$(nix-instantiate do-it.nix); then exit 1; fi
|
||||
|
||||
if ! nix-store -r "$storeexpr" > /dev/null; then exit 1; fi
|
||||
|
||||
if ! outpath=$(nix-store -qn "$storeexpr"); then exit 1; fi
|
||||
|
||||
uploader="http://losser.st-lab.cs.uu.nl/~eelco/cgi-bin/upload.pl/"
|
||||
|
||||
curl --silent -T "$outpath/manual.html" "$uploader" > /dev/null || exit 1
|
||||
curl --silent -T "$outpath"/nix-*.tar.bz2 "$uploader" > /dev/null || exit 1
|
20
nix-dist/do-it.nix
Normal file
20
nix-dist/do-it.nix
Normal file
@ -0,0 +1,20 @@
|
||||
let {
|
||||
system = "i686-suse-linux";
|
||||
pkgs = (import ../pkgs/system/all-packages.nix) {system = system};
|
||||
stdenv = pkgs.stdenv_;
|
||||
|
||||
sourcedist = (import ./nix-source-dist.nix) {
|
||||
stdenv = stdenv;
|
||||
autoconf = pkgs.autoconf;
|
||||
automake = pkgs.automake;
|
||||
libxml2 = pkgs.libxml2;
|
||||
libxslt = pkgs.libxslt;
|
||||
docbook_dtd = pkgs.docbook_xml_dtd;
|
||||
docbook_xslt = pkgs.docbook_xml_xslt;
|
||||
fetchurl = pkgs.fetchurl;
|
||||
fetchsvn = pkgs.fetchsvn;
|
||||
rev = import ./head-revision.nix;
|
||||
};
|
||||
|
||||
body = sourcedist;
|
||||
}
|
38
nix-dist/nix-source-dist.nix
Normal file
38
nix-dist/nix-source-dist.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, autoconf, automake, libxml2, libxslt
|
||||
, docbook_dtd, docbook_xslt
|
||||
, fetchurl, fetchsvn, rev
|
||||
}:
|
||||
|
||||
derivation {
|
||||
name = "nix-source-dist";
|
||||
system = stdenv.system;
|
||||
|
||||
builder = ./nix-source-dist.sh;
|
||||
src = fetchsvn {
|
||||
url = "https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/";
|
||||
rev = rev;
|
||||
};
|
||||
|
||||
bdbSrc = fetchurl {
|
||||
url = "http://www.sleepycat.com/update/snapshot/db-4.1.25.tar.gz";
|
||||
md5 = "df71961002b552c0e72c6e4e358f27e1";
|
||||
};
|
||||
|
||||
atermSrc = fetchurl {
|
||||
url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz;
|
||||
md5 = "68aefb0c10b2ab876b8d3c0b2d0cdb1b";
|
||||
};
|
||||
|
||||
sdfSrc = fetchurl {
|
||||
url = ftp://ftp.stratego-language.org/pub/stratego/sdf2/sdf2-bundle-1.6.tar.gz;
|
||||
md5 = "283be0b4c7c9575c1b5cc735316e6192";
|
||||
};
|
||||
|
||||
stdenv = stdenv;
|
||||
autoconf = autoconf;
|
||||
automake = automake;
|
||||
libxml2 = libxml2;
|
||||
libxslt = libxslt;
|
||||
docbook_dtd = docbook_dtd;
|
||||
docbook_xslt = docbook_xslt;
|
||||
}
|
31
nix-dist/nix-source-dist.sh
Executable file
31
nix-dist/nix-source-dist.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#! /bin/sh
|
||||
|
||||
buildinputs="$autoconf $automake $libxml2 $libxslt"
|
||||
. $stdenv/setup
|
||||
|
||||
echo "copying sources..."
|
||||
cp -prd $src/* . || exit 1
|
||||
chmod -R u+w . || exit 1
|
||||
cp -p $bdbSrc externals/db-4.1.25.tar.gz || exit 1 # !!!
|
||||
cp -p $atermSrc externals/aterm-2.0.5.tar.gz || exit 1
|
||||
cp -p $sdfSrc externals/sdf2-bundle-1.6.tar.gz || exit 1
|
||||
|
||||
echo "autoconfing..."
|
||||
autoreconf -i || exit 1
|
||||
|
||||
echo "configuring..."
|
||||
./configure || exit 1
|
||||
|
||||
echo "building..."
|
||||
export DOCBOOK_DTD=$docbook_dtd/xml/dtd/docbook
|
||||
export DOCBOOK_XSL=$docbook_xslt/xml/xsl/docbook
|
||||
#(cd doc && make) || exit 1
|
||||
make distdir || exit 1
|
||||
pkgname=$(echo nix-*)
|
||||
tar cvfz $pkgname.tar.gz $pkgname || exit 1
|
||||
tar cvfj $pkgname.tar.bz2 $pkgname || exit 1
|
||||
|
||||
echo "copying result..."
|
||||
mkdir $out || exit 1
|
||||
cp -p $pkgname.tar.gz $pkgname.tar.bz2 $out || exit 1
|
||||
cp -p doc/manual/book.html $out/manual.html || exit 1
|
Loading…
Reference in New Issue
Block a user