2021-02-05 17:12:51 +00:00
|
|
|
{lib, stdenv, fetchurl, ncurses, automake}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "aalib";
|
|
|
|
version = "1.4rc5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-26 17:43:05 +00:00
|
|
|
url = "mirror://sourceforge/aa-project/aalib-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "man" "info" ];
|
|
|
|
setOutputFlags = false; # Doesn't support all the flags
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
patches = [ ./clang.patch ] # Fix implicit `int` on `main` error with newer versions of clang
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ ./darwin.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
|
|
|
|
configureFlags = [ "--without-x" "--with-ncurses=${ncurses.dev}" ];
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
env = lib.optionalAttrs stdenv.cc.isGNU {
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +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";
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
license = lib.licenses.lgpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|