Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 91 lines 1.9 kB view raw
1{ stdenv 2, fetchurl 3, symlinkJoin 4, makeWrapper 5, tcl 6, fontconfig 7, tk 8, ncurses 9, xorg 10, file 11}: 12 13let 14 # eli derives the location of the include folder from the location of the lib folder 15 tk_combined = symlinkJoin { 16 name = "tk_combined"; 17 paths = [ 18 tk 19 tk.dev 20 ]; 21 }; 22 curses_combined = symlinkJoin { 23 name = "curses_combined"; 24 paths = [ 25 ncurses 26 ncurses.dev 27 ]; 28 }; 29in 30stdenv.mkDerivation rec { 31 name = "eli-${version}"; 32 version = "4.8.1"; 33 34 src = fetchurl { 35 url = "mirror://sourceforge/project/eli-project/Eli/Eli%20${version}/${name}.tar.bz2"; 36 sha256="1vran8583hbwrr5dciji4zkhz3f88w4mn8n9sdpr6zw0plpf1whj"; 37 }; 38 39 buildInputs = [ 40 ncurses 41 fontconfig 42 ] ++ (with xorg; [ 43 libX11.dev 44 libXt.dev 45 libXaw.dev 46 libXext.dev 47 ]); 48 49 nativeBuildInputs = [ 50 file 51 makeWrapper 52 ]; 53 54 # skip interactive browser check 55 buildFlags = "nobrowsers"; 56 57 58 preConfigure='' 59 configureFlagsArray=( 60 --with-tcltk="${tcl} ${tk_combined}" 61 --with-curses="${curses_combined}" 62 ) 63 export ODIN_LOCALIPC=1 64 ''; 65 66 postInstall = '' 67 wrapProgram "$out/bin/eli" \ 68 --set ODIN_LOCALIPC 1 69 ''; 70 71 # Test if eli starts 72 doInstallCheck = true; 73 installCheckPhase = '' 74 export HOME="$TMP/home" 75 mkdir -p "$HOME" 76 $out/bin/eli "!ls" 77 ''; 78 79 meta = { 80 description = "Translator Construction Made Easy"; 81 longDescription = '' 82 Eli is a programming environment that supports all phases of translator 83 construction with extensive libraries implementing common tasks, yet handling 84 arbitrary special cases. Output is the C subset of C++. 85 ''; 86 homepage = http://eli-project.sourceforge.net/; 87 license = stdenv.lib.licenses.gpl2; 88 maintainers = with stdenv.lib.maintainers; [ timokau ]; 89 platforms = stdenv.lib.platforms.linux; 90 }; 91}