2008-04-14 13:47:26 +02:00
|
|
|
{ fetchurl, stdenv, expect, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-03-11 20:45:51 +01:00
|
|
|
name = "dejagnu-1.5";
|
2008-04-14 13:47:26 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/dejagnu/${name}.tar.gz";
|
2011-03-11 20:45:51 +01:00
|
|
|
sha256 = "1nx3x3h96a82q92q108q71giv2nz9xmbbn2nrlr3wvvs6l45id68";
|
2008-04-14 13:47:26 +02:00
|
|
|
};
|
|
|
|
|
2010-03-18 16:47:29 +01:00
|
|
|
patches = [ ./wrapped-runtest-program-name.patch ];
|
|
|
|
|
2008-04-14 13:47:26 +02:00
|
|
|
buildInputs = [ expect makeWrapper ];
|
|
|
|
|
2011-03-11 20:45:51 +01:00
|
|
|
doCheck = true;
|
2008-10-16 22:11:21 +02:00
|
|
|
|
2011-03-11 20:45:51 +01:00
|
|
|
# Note: The test-suite *requires* /dev/pts among the `build-chroot-dirs' of
|
|
|
|
# the build daemon when building in a chroot. See
|
|
|
|
# <http://thread.gmane.org/gmane.linux.distributions.nixos/1036> for
|
|
|
|
# details.
|
2008-10-16 22:54:32 +02:00
|
|
|
|
2011-03-11 20:45:51 +01:00
|
|
|
# The test-suite needs to have a non-empty stdin:
|
2008-10-16 22:54:32 +02:00
|
|
|
# http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html
|
2008-10-16 22:11:21 +02:00
|
|
|
checkPhase = ''
|
|
|
|
# Provide `runtest' with a log name, otherwise it tries to run
|
|
|
|
# `whoami', which fails when in a chroot.
|
2011-03-11 20:45:51 +01:00
|
|
|
LOGNAME="nix-build-daemon" make check < /dev/zero
|
2008-10-16 22:11:21 +02:00
|
|
|
'';
|
2008-04-14 13:47:26 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/runtest" \
|
2011-03-11 20:45:51 +01:00
|
|
|
--prefix PATH ":" "${expect}/bin"
|
2008-04-14 13:47:26 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The DejaGNU testing framework";
|
2011-03-11 20:45:51 +01:00
|
|
|
|
2008-04-14 13:47:26 +02:00
|
|
|
longDescription = ''
|
|
|
|
DejaGnu is a framework for testing other programs. Its purpose
|
|
|
|
is to provide a single front end for all tests. Think of it as a
|
|
|
|
custom library of Tcl procedures crafted to support writing a
|
|
|
|
test harness. A test harness is the testing infrastructure that
|
|
|
|
is created to support a specific program or tool. Each program
|
|
|
|
can have multiple testsuites, all supported by a single test
|
|
|
|
harness. DejaGnu is written in Expect, which in turn uses Tcl --
|
|
|
|
Tool command language.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/dejagnu/;
|
|
|
|
license = "GPLv2+";
|
2011-03-11 20:45:51 +01:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
2008-04-14 13:47:26 +02:00
|
|
|
};
|
|
|
|
}
|