summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-04-17 14:49:21 +0100
committerGitHub <noreply@github.com>2018-04-17 14:49:21 +0100
commit9758c498f97407dd4cd2a610e2f8f4dc34e0c77f (patch)
tree41ba3508f9cec2b31332efc0d70356fc56ac333e /pkgs/development/compilers
parent6b77dfdf70d038d2dc12a8d9760b714aa67eacd9 (diff)
parent4e0a5e253387a51c19e3ce82ac6b30753a769a8f (diff)
downloadnixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.tar
nixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.tar.gz
nixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.tar.bz2
nixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.tar.lz
nixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.tar.xz
nixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.tar.zst
nixlib-9758c498f97407dd4cd2a610e2f8f4dc34e0c77f.zip
Merge pull request #38907 from timokau/eli-init
eli: init at 4.8.1
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/eli/default.nix91
1 files changed, 91 insertions, 0 deletions
diff --git a/pkgs/development/compilers/eli/default.nix b/pkgs/development/compilers/eli/default.nix
new file mode 100644
index 000000000000..93e53aa30d13
--- /dev/null
+++ b/pkgs/development/compilers/eli/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, fetchurl
+, symlinkJoin
+, makeWrapper
+, tcl
+, fontconfig
+, tk
+, ncurses
+, xorg
+, file
+}:
+
+let
+  # eli derives the location of the include folder from the location of the lib folder
+  tk_combined = symlinkJoin {
+    name = "tk_combined";
+    paths = [
+      tk
+      tk.dev
+    ];
+  };
+  curses_combined = symlinkJoin {
+    name = "curses_combined";
+    paths = [
+      ncurses
+      ncurses.dev
+    ];
+  };
+in
+stdenv.mkDerivation rec {
+  name = "eli";
+  version = "4.8.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/eli-project/Eli/Eli%20${version}/eli-${version}.tar.bz2";
+    sha256="1vran8583hbwrr5dciji4zkhz3f88w4mn8n9sdpr6zw0plpf1whj";
+  };
+
+  buildInputs = [
+    ncurses
+    fontconfig
+  ] ++ (with xorg; [
+    libX11.dev
+    libXt.dev
+    libXaw.dev
+    libXext.dev
+  ]);
+
+  nativeBuildInputs = [
+    file
+    makeWrapper
+  ];
+
+  # skip interactive browser check
+  buildFlags = "nobrowsers";
+
+
+  preConfigure=''
+    configureFlagsArray=(
+      --with-tcltk="${tcl} ${tk_combined}"
+      --with-curses="${curses_combined}"
+    )
+    export ODIN_LOCALIPC=1
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/eli" \
+      --set ODIN_LOCALIPC 1
+  '';
+
+  # Test if eli starts
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export HOME="$TMP/home"
+    mkdir -p "$HOME"
+    $out/bin/eli "!ls"
+  '';
+
+  meta = {
+    description = "Translator Construction Made Easy";
+    longDescription = ''
+      Eli is a programming environment that supports all phases of translator
+      construction with extensive libraries implementing common tasks, yet handling
+      arbitrary special cases. Output is the C subset of C++.
+    '';
+    homepage = http://eli-project.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = with stdenv.lib.maintainers; [ timokau ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}