From 4fe96a6b168fbd2165ee4962503f487ac188695c Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Thu, 24 Feb 2022 08:54:39 +0100 Subject: [PATCH] Test curses dependency --- pkgs/development/libraries/aspell/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix index 94db55629496..b839092228b3 100644 --- a/pkgs/development/libraries/aspell/default.nix +++ b/pkgs/development/libraries/aspell/default.nix @@ -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/";