2024-06-30 08:12:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
ncurses,
|
|
|
|
automake,
|
|
|
|
}:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "aalib";
|
|
|
|
version = "1.4rc5";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/aa-project/aalib-${version}.tar.gz";
|
|
|
|
sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv";
|
|
|
|
};
|
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
outputs = [
|
|
|
|
"bin"
|
|
|
|
"dev"
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
"info"
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
setOutputFlags = false; # Doesn't support all the flags
|
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
patches =
|
|
|
|
[ ./clang.patch ] # Fix implicit `int` on `main` error with newer versions of clang
|
2024-05-02 00:46:19 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ ./darwin.patch ];
|
|
|
|
|
|
|
|
# The fuloong2f is not supported by aalib still
|
|
|
|
preConfigure = ''
|
|
|
|
cp ${automake}/share/automake*/config.{sub,guess} .
|
|
|
|
configureFlagsArray+=(
|
|
|
|
"--bindir=$bin/bin"
|
|
|
|
"--includedir=$dev/include"
|
|
|
|
"--libdir=$out/lib"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2024-06-30 08:12:46 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--without-x"
|
|
|
|
"--with-ncurses=${ncurses.dev}"
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/bin
|
|
|
|
mv $bin/bin/aalib-config $dev/bin/aalib-config
|
|
|
|
substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ASCII art graphics library";
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
license = lib.licenses.lgpl2;
|
|
|
|
};
|
|
|
|
}
|