@@ -41,7 +41,9 @@ stdenv.mkDerivation rec {
4141 meta = with lib; {
4242 description = "C-style arbitrary precision calculator";
4343 homepage = "http://www.isthe.com/chongo/tech/comp/calc/";
44− license = licenses.lgpl21Only;
44+ # The licensing situation depends on readline (see section 3 of the LGPL)
45+ # If linked against readline then GPLv2 otherwise LGPLv2.1
46+ license = with licenses; if enableReadline then gpl2Only else lgpl21Only;
4547 maintainers = with maintainers; [ matthewbauer ];
4648 platforms = platforms.all;
4749 };