1{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
2
3stdenv.mkDerivation rec {
4 version = src.rev;
5 name = "eql-git-${version}";
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 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
20 buildPhase = ''
21 cd src
22 ecl -shell make-eql-lib.lisp
23 qmake eql_lib.pro
24 make
25 cd ..
26
27 cd src
28 qmake eql_exe.pro
29 make
30 cd ..
31 cd src
32 '';
33
34 installPhase = ''
35 cd ..
36 mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
37 cp -r . $out/lib/eql/build-dir
38 ln -s $out/lib/eql/build-dir/eql $out/bin
39 ln -s $out/lib/eql/build-dir/src/*.h $out/include
40 ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
41 ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
42 '';
43
44 meta = with stdenv.lib; {
45 description = "Embedded Qt Lisp (ECL+Qt)";
46 maintainers = with maintainers; [ raskin ];
47 platforms = platforms.linux;
48 license = licenses.mit;
49 };
50
51 passthru = {
52 updateInfo = {
53 downloadPage = "http://password-taxi.at/EQL";
54 method = "fetchgit";
55 rev = src.rev;
56 url = src.url;
57 hash = src.sha256;
58 };
59 };
60}