1x@{builderDefsPackage
2 , fetchgit, qt4, ecl, xorgserver
3 , xkbcomp, xkeyboard_config
4 , ...}:
5builderDefsPackage
6(a :
7let
8 helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
9 ["fetchgit"];
10
11 buildInputs = map (n: builtins.getAttr n x)
12 (builtins.attrNames (builtins.removeAttrs x helperArgNames));
13 sourceInfo = rec {
14 method = "fetchgit";
15 rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
16 url = "git://gitorious.org/eql/eql";
17 hash = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8";
18 version = rev;
19 name = "eql-git-${version}";
20 };
21in
22rec {
23 srcDrv = a.fetchgit {
24 url = sourceInfo.url;
25 sha256 = sourceInfo.hash;
26 rev = sourceInfo.rev;
27 };
28 src = srcDrv + "/";
29
30 inherit (sourceInfo) name version;
31 inherit buildInputs;
32
33 phaseNames = ["setVars" "fixPaths" "doQMake" "doMake" "doDeploy"];
34
35 setVars = a.fullDepEntry (''
36 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
37 '') [];
38
39 fixPaths = a.fullDepEntry (''
40 sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
41 '') ["minInit" "doUnpack"];
42
43 doQMake = a.fullDepEntry (''
44 cd src
45 qmake eql_exe.pro
46 make
47 cd ..
48 cd src
49 '') ["addInputs" "doUnpack" "buildEQLLib"];
50
51 doDeploy = a.fullDepEntry (''
52 cd ..
53 mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
54 cp -r . $out/lib/eql/build-dir
55 ln -s $out/lib/eql/build-dir/eql $out/bin
56 ln -s $out/lib/eql/build-dir/src/*.h $out/include
57 ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
58 ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
59 '') ["minInit"];
60
61 buildEQLLib = a.fullDepEntry (''
62 cd src
63 ecl -shell make-eql-lib.lisp
64 qmake eql_lib.pro
65 make
66 cd ..
67 '') ["doUnpack" "addInputs"];
68
69
70 meta = {
71 description = "Embedded Qt Lisp (ECL+Qt)";
72 maintainers = with a.lib.maintainers;
73 [
74 raskin
75 ];
76 platforms = with a.lib.platforms;
77 linux;
78 };
79 passthru = {
80 updateInfo = {
81 downloadPage = "http://password-taxi.at/EQL";
82 method = "fetchgit";
83 rev = "370b7968fd73d5babc81e35913a37111a788487f";
84 url = "git://gitorious.org/eql/eql";
85 hash = "2370e111d86330d178f3ec95e8fed13607e51fed8859c6e95840df2a35381636";
86 };
87 inherit srcDrv;
88 };
89}) x
90