1{ lib, stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
2
3stdenv.mkDerivation rec {
4 version = "unstable-2012-12-10";
5 pname = "eql";
6 src = fetchgit {
7 rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
8 url = "https://gitlab.com/eql/eql.git";
9 sha256 = "17h23qr7fyr9hvjgiq0yhacmjs43x06vh8978aq42ymcgipxdcww";
10 };
11
12 buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];
13
14 env.NIX_CFLAGS_COMPILE = "-fPIC";
15
16 postPatch = ''
17 sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
18
19 # cl_def_c_function was renamed to ecl_def_c_function in ECL 20.4.24.
20 find . -type f -exec sed -e 's/\scl_def_c_function(/ ecl_def_c_function(/' -i {} \;
21 '';
22
23 buildPhase = ''
24 cd src
25 ecl -shell make-eql-lib.lisp
26 qmake eql_lib.pro
27 make
28 cd ..
29
30 cd src
31 qmake eql_exe.pro
32 make
33 cd ..
34 cd src
35 '';
36
37 installPhase = ''
38 cd ..
39 mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
40 cp -r . $out/lib/eql/build-dir
41 ln -s $out/lib/eql/build-dir/eql $out/bin
42 ln -s $out/lib/eql/build-dir/src/*.h $out/include
43 ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
44 ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
45 '';
46
47 meta = with lib; {
48 description = "Embedded Qt Lisp (ECL+Qt)";
49 maintainers = with maintainers; [ raskin ];
50 platforms = platforms.linux;
51 license = licenses.mit;
52 };
53
54 passthru = {
55 updateInfo = {
56 downloadPage = "http://password-taxi.at/EQL";
57 method = "fetchgit";
58 rev = src.rev;
59 url = src.url;
60 hash = src.sha256;
61 };
62 };
63}