Files
nixpkgs/pkgs/by-name/aa/aalib/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchurl,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "aalib";
version = "1.4rc5";
src = fetchurl {
url = "mirror://sourceforge/aa-project/aalib-${version}.tar.gz";
sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv";
};
outputs = [
"bin"
"dev"
"out"
"man"
"info"
];
setOutputFlags = false; # Doesn't support all the flags
patches = [
# Fix implicit `int` on `main` error with newer versions of clang
./clang.patch
# Fix build against opaque aalib API
./ncurses-6.5.patch
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ ./darwin.patch ];
# The fuloong2f is not supported by aalib still
preConfigure = ''
configureFlagsArray+=(
"--bindir=$bin/bin"
"--includedir=$dev/include"
"--libdir=$out/lib"
)
'';
buildInputs = [ ncurses ];
configureFlags = [
"--without-x"
"--with-ncurses=${ncurses.dev}"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
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;
};
}