nixpkgs/pkgs/development/libraries/aalib/default.nix
Thomas Tuegel 3ef7671cea ncurses: combine $lib and $out outputs
The $lib output refers to the terminfo database in $out, which is about
10x larger than the ncurses shared library. Splitting these outputs
saves a small amount of space for any derivations that use the terminfo
database but not the ncurses library, but we do not have evidence that
any such exist.
2016-03-08 11:35:24 -06:00

40 lines
1015 B
Nix

{stdenv, fetchurl, ncurses, automake}:
stdenv.mkDerivation {
name = "aalib-1.4rc5";
src = fetchurl {
url = mirror://sourceforge/aa-project/aalib-1.4rc5.tar.gz;
sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv";
};
outputs = [ "dev" "out" "bin" "doc" ];
setOutputFlags = false; # Doesn't support all the flags
patches = stdenv.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 ];
configureFlags = "--without-x --with-ncurses=${ncurses}";
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";
};
}