aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/compilers/eql/default.nix
blob: aac619126896c10372114c4e2bb84cfa8dee4ddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:

stdenv.mkDerivation rec {
  version = src.rev;
  pname = "eql-git";
  src = fetchgit {
    rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
    url = "https://gitlab.com/eql/eql.git";
    sha256 = "17h23qr7fyr9hvjgiq0yhacmjs43x06vh8978aq42ymcgipxdcww";
  };

  buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];

  NIX_CFLAGS_COMPILE = "-fPIC";

  postPatch = ''
    sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
  '';

  buildPhase = ''
    cd src
    ecl -shell make-eql-lib.lisp
    qmake eql_lib.pro
    make
    cd ..

    cd src
    qmake eql_exe.pro
    make
    cd ..
    cd src
  '';

  installPhase = ''
    cd ..
    mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
    cp -r . $out/lib/eql/build-dir
    ln -s $out/lib/eql/build-dir/eql $out/bin
    ln -s $out/lib/eql/build-dir/src/*.h $out/include
    ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
    ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
  '';

  meta = with stdenv.lib; {
    description = "Embedded Qt Lisp (ECL+Qt)";
    maintainers = with maintainers; [ raskin ];
    platforms = platforms.linux;
    license = licenses.mit;
  };

  passthru = {
    updateInfo = {
      downloadPage = "http://password-taxi.at/EQL";
      method = "fetchgit";
      rev = src.rev;
      url = src.url;
      hash = src.sha256;
    };
  };
}