1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

* Build the source distribution before uploading it.

svn path=/nixpkgs/trunk/; revision=569
This commit is contained in:
Eelco Dolstra 2003-12-02 13:04:21 +00:00
parent cd0ad9e00a
commit be3479234b
4 changed files with 38 additions and 4 deletions

View file

@ -9,11 +9,16 @@ if ! rev=$(curl --silent -k https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/ \
echo $rev > head-revision.nix echo $rev > head-revision.nix
if ! storeexpr=$(nix-instantiate -vvv do-it.nix); then exit 1; fi if ! storeexprs=($(nix-instantiate -vvv do-it.nix)); then exit 1; fi
if ! nix-store -vvvv -r "$storeexpr" > /dev/null; then exit 1; fi srcexpr=${storeexprs[0]}
testexpr=${storeexprs[1]}
if ! outpath=$(nix-store -qn "$storeexpr"); then exit 1; fi if ! nix-store -vvvv -r "$srcexpr" > /dev/null; then exit 1; fi
if ! nix-store -vvvv -r "$testexpr" > /dev/null; then exit 1; fi
if ! outpath=$(nix-store -qn "$srcexpr"); then exit 1; fi
uploader="http://losser.st-lab.cs.uu.nl/~eelco/cgi-bin/upload.pl/" uploader="http://losser.st-lab.cs.uu.nl/~eelco/cgi-bin/upload.pl/"

View file

@ -16,5 +16,11 @@ let {
rev = import ./head-revision.nix; rev = import ./head-revision.nix;
}; };
body = sourcedist; testbuild = (import ./nix-test-build.nix) {
stdenv = stdenv;
getopt = pkgs.getopt;
src = sourcedist;
};
body = [sourcedist testbuild];
} }

View file

@ -0,0 +1,12 @@
{stdenv, getopt, src}:
derivation {
name = "nix-test-build";
system = stdenv.system;
builder = ./nix-test-build.sh;
src = src;
stdenv = stdenv;
getopt = getopt; # required by sdf2table
}

11
nix-dist/nix-test-build.sh Executable file
View file

@ -0,0 +1,11 @@
#! /bin/sh
buildinputs="$getopt"
. $stdenv/setup || exit 1
tar xvfj $src/*.tar.bz2 || exit 1
cd nix-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make check || exit 1
make install || exit 1