Test curses dependency

This commit is contained in:
Joachim Breitner 2022-02-24 08:54:39 +01:00
parent f94dfc5b40
commit 4fe96a6b16

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchurl, fetchpatch, fetchzip, perl, ncurses
# for tests
, aspell, glibc, runCommand
, searchNixProfiles ? true
}:
@ -55,6 +59,19 @@ stdenv.mkDerivation rec {
cp ${devaMapsSource}/u-deva.{cmap,cset} $out/lib/aspell/
'';
passthru.tests = {
uses-curses = runCommand "${pname}-curses" {
buildInputs = [ glibc ];
} ''
if ! ldd ${aspell}/bin/aspell | grep -q ${ncurses}
then
echo "Test failure: It does not look like aspell picked up the curses dependency."
exit 1
fi
touch $out
'';
};
meta = {
description = "Spell checker for many languages";
homepage = "http://aspell.net/";