2008-04-14 12:47:26 +01:00
|
|
|
{ fetchurl, stdenv, expect, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-12-16 09:02:46 +00:00
|
|
|
name = "dejagnu-1.6.2";
|
2008-04-14 12:47:26 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/dejagnu/${name}.tar.gz";
|
2018-12-16 09:02:46 +00:00
|
|
|
sha256 = "0qfj2wd4qk1yn9yzam6g8nmyxfazcc0knjyyibycb2ainkhp21hd";
|
2008-04-14 12:47:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ expect makeWrapper ];
|
|
|
|
|
2011-03-11 19:45:51 +00:00
|
|
|
doCheck = true;
|
2008-10-16 21:11:21 +01:00
|
|
|
|
2011-03-11 19:45:51 +00:00
|
|
|
# Note: The test-suite *requires* /dev/pts among the `build-chroot-dirs' of
|
|
|
|
# the build daemon when building in a chroot. See
|
2018-11-30 01:19:05 +00:00
|
|
|
# <https://www.mail-archive.com/nix-dev@cs.uu.nl/msg01056.html> for
|
2011-03-11 19:45:51 +00:00
|
|
|
# details.
|
2008-10-16 21:54:32 +01:00
|
|
|
|
2011-03-11 19:45:51 +00:00
|
|
|
# The test-suite needs to have a non-empty stdin:
|
2018-12-01 18:22:13 +00:00
|
|
|
# https://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html
|
2008-10-16 21:11:21 +01:00
|
|
|
checkPhase = ''
|
|
|
|
# Provide `runtest' with a log name, otherwise it tries to run
|
|
|
|
# `whoami', which fails when in a chroot.
|
2011-03-11 19:45:51 +00:00
|
|
|
LOGNAME="nix-build-daemon" make check < /dev/zero
|
2008-10-16 21:11:21 +01:00
|
|
|
'';
|
2008-04-14 12:47:26 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/runtest" \
|
2013-09-07 06:55:55 +01:00
|
|
|
--prefix PATH ":" "${expect}/bin"
|
2008-04-14 12:47:26 +01:00
|
|
|
'';
|
|
|
|
|
2015-04-30 19:48:44 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-23 15:16:18 +01:00
|
|
|
description = "Framework for testing other programs";
|
2011-03-11 19:45:51 +00:00
|
|
|
|
2008-04-14 12:47:26 +01: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.
|
|
|
|
'';
|
|
|
|
|
2018-12-01 18:22:13 +00:00
|
|
|
homepage = https://www.gnu.org/software/dejagnu/;
|
2015-04-30 19:48:44 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2011-03-11 19:45:51 +00:00
|
|
|
|
2018-05-01 04:28:11 +01:00
|
|
|
platforms = platforms.unix;
|
2016-07-04 02:39:04 +01:00
|
|
|
maintainers = with maintainers; [ wkennington vrthra ];
|
2008-04-14 12:47:26 +01:00
|
|
|
};
|
|
|
|
}
|