nixpkgs/pkgs/development/interpreters/lua-5/default.nix
David Guibert 9f77579f41 lua: install lua.pc
svn path=/nixpkgs/trunk/; revision=23049
2010-08-09 06:48:21 +00:00

19 lines
598 B
Nix

{stdenv, fetchurl, ncurses, readline}:
stdenv.mkDerivation {
name = "lua-5.1.4";
src = fetchurl {
url = http://www.lua.org/ftp/lua-5.1.4.tar.gz;
sha256 = "0fmgk100ficm1jbm4ga9xy484v4cm89wsdfckdybb9gjx8jy4f5h";
};
makeFlags = [ "CFLAGS=-fPIC" ];
buildFlags = "linux"; # TODO: support for non-linux systems
installFlags = "install INSTALL_TOP=\${out}";
postInstall = ''
sed -i -e "s@/usr/local@$out@" etc/lua.pc
sed -i -e "s@-llua -lm@-llua -lm -ldl@" etc/lua.pc
install -D -m 644 etc/lua.pc $out/lib/pkgconfig/lua.pc
'';
buildInputs = [ ncurses readline ];
}