1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/compilers/eli/default.nix

92 lines
1.8 KiB
Nix
Raw Normal View History

2018-04-13 17:12:53 +01:00
{ stdenv
, fetchurl
, symlinkJoin
, makeWrapper
, tcl
, fontconfig
, tk
, ncurses
, xorg
, file
}:
let
# eli derives the location of the include folder from the location of the lib folder
tk_combined = symlinkJoin {
name = "tk_combined";
paths = [
tk
tk.dev
];
};
curses_combined = symlinkJoin {
name = "curses_combined";
paths = [
ncurses
ncurses.dev
];
};
in
stdenv.mkDerivation rec {
2018-05-28 13:59:57 +01:00
name = "eli-${version}";
2018-04-13 17:12:53 +01:00
version = "4.8.1";
src = fetchurl {
2018-05-28 13:59:57 +01:00
url = "mirror://sourceforge/project/eli-project/Eli/Eli%20${version}/${name}.tar.bz2";
2018-04-13 17:12:53 +01:00
sha256="1vran8583hbwrr5dciji4zkhz3f88w4mn8n9sdpr6zw0plpf1whj";
};
buildInputs = [
ncurses
fontconfig
] ++ (with xorg; [
libX11.dev
libXt.dev
libXaw.dev
libXext.dev
]);
nativeBuildInputs = [
file
makeWrapper
];
# skip interactive browser check
buildFlags = "nobrowsers";
preConfigure=''
configureFlagsArray=(
--with-tcltk="${tcl} ${tk_combined}"
--with-curses="${curses_combined}"
)
export ODIN_LOCALIPC=1
'';
postInstall = ''
wrapProgram "$out/bin/eli" \
--set ODIN_LOCALIPC 1
'';
# Test if eli starts
doInstallCheck = true;
installCheckPhase = ''
export HOME="$TMP/home"
mkdir -p "$HOME"
$out/bin/eli "!ls"
'';
meta = {
description = "Translator Construction Made Easy";
longDescription = ''
Eli is a programming environment that supports all phases of translator
construction with extensive libraries implementing common tasks, yet handling
arbitrary special cases. Output is the C subset of C++.
'';
homepage = http://eli-project.sourceforge.net/;
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ timokau ];
platforms = stdenv.lib.platforms.linux;
};
}