about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/enlightenment
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/enlightenment')
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/default.nix14
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/econnman.nix29
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/efl-elua.patch14
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/efl.nix94
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/elementary.patch18
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/enlightenment.nix78
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/enlightenment.suid-exes.patch25
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/ephoto.nix30
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/rage.nix37
-rw-r--r--nixpkgs/pkgs/desktops/enlightenment/terminology.nix32
10 files changed, 371 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/enlightenment/default.nix b/nixpkgs/pkgs/desktops/enlightenment/default.nix
new file mode 100644
index 000000000000..a8b5e08abd65
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/default.nix
@@ -0,0 +1,14 @@
+{ callPackage, pkgs }:
+rec {
+  #### CORE EFL
+  efl = callPackage ./efl.nix { openjpeg = pkgs.openjpeg_1; };
+
+  #### WINDOW MANAGER
+  enlightenment = callPackage ./enlightenment.nix { };
+
+  #### APPLICATIONS
+  econnman = callPackage ./econnman.nix { };
+  terminology = callPackage ./terminology.nix { };
+  rage = callPackage ./rage.nix { };
+  ephoto = callPackage ./ephoto.nix { };
+}
diff --git a/nixpkgs/pkgs/desktops/enlightenment/econnman.nix b/nixpkgs/pkgs/desktops/enlightenment/econnman.nix
new file mode 100644
index 000000000000..60e63dc68ed9
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/econnman.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, pkgconfig, efl, python2Packages, dbus, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "econnman-${version}";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "http://download.enlightenment.org/rel/apps/econnman/${name}.tar.gz";
+    sha256 = "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0";
+  };
+
+  nativeBuildInputs = [ makeWrapper pkgconfig python2Packages.wrapPython ];
+
+  buildInputs = [ efl python2Packages.python dbus ];
+
+  pythonPath = [ python2Packages.pythonefl python2Packages.dbus-python ];
+
+  postInstall = ''
+    wrapPythonPrograms
+  '';
+
+  meta = {
+    description = "A user interface for the connman network connection manager";
+    homepage = http://enlightenment.org/;
+    maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.lgpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/enlightenment/efl-elua.patch b/nixpkgs/pkgs/desktops/enlightenment/efl-elua.patch
new file mode 100644
index 000000000000..96c42b3ff3ca
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/efl-elua.patch
@@ -0,0 +1,14 @@
+--- ./src/scripts/elua/core/util.lua.old	2015-05-17 11:59:57.307743243 +0200
++++ ./src/scripts/elua/core/util.lua	2015-05-17 12:39:11.906797377 +0200
+@@ -159,7 +159,10 @@
+         local ev = os.getenv("ELUA_" .. libname:upper() .. "_LIBRARY_PATH")
+         local succ, v = load_lib(libname, ev)
+         if not succ then
+-            error(v, 2)
++            succ, v = load_lib(libname, "$out/lib")
++            if not succ then
++                error(v, 2)
++            end
+         end
+         lib = v
+         loaded_libs[libname] = lib
diff --git a/nixpkgs/pkgs/desktops/enlightenment/efl.nix b/nixpkgs/pkgs/desktops/enlightenment/efl.nix
new file mode 100644
index 000000000000..ea4e6cd1f1c9
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/efl.nix
@@ -0,0 +1,94 @@
+{ stdenv, fetchurl, pkgconfig, openssl, libjpeg, zlib, lz4, freetype, fontconfig
+, fribidi, SDL2, SDL, libGL, giflib, libpng, libtiff, glib, gst_all_1, libpulseaudio
+, libsndfile, xorg, libdrm, libxkbcommon, udev, utillinux, bullet, luajit
+, python27Packages, openjpeg, doxygen, expat, harfbuzz, jbig2dec, librsvg
+, dbus, alsaLib, poppler, ghostscript, libraw, libspectre, xineLib, libwebp
+, curl, libinput, systemd, mesa_noglu, writeText, gtk3
+}:
+
+stdenv.mkDerivation rec {
+  name = "efl-${version}";
+  version = "1.21.1";
+
+  src = fetchurl {
+    url = "http://download.enlightenment.org/rel/libs/efl/${name}.tar.xz";
+    sha256 = "0a5907h896pvpix7a6idc2fspzy6d78xrzf84k8y9fyvnd14nxs4";
+  };
+
+  nativeBuildInputs = [ pkgconfig gtk3 ];
+
+  buildInputs = [ openssl zlib lz4 freetype fontconfig SDL libGL mesa_noglu
+    giflib libpng libtiff glib gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
+    gst_all_1.gst-libav libpulseaudio libsndfile xorg.libXcursor xorg.xorgproto
+    xorg.libX11 udev systemd ];
+
+  propagatedBuildInputs = [ libxkbcommon python27Packages.dbus-python dbus libjpeg xorg.libXcomposite
+    xorg.libXdamage xorg.libXinerama xorg.libXp xorg.libXtst xorg.libXi xorg.libXext
+    bullet xorg.libXScrnSaver xorg.libXrender xorg.libXfixes xorg.libXrandr
+    xorg.libxkbfile xorg.libxcb xorg.xcbutilkeysyms openjpeg doxygen expat luajit
+    harfbuzz jbig2dec librsvg dbus alsaLib poppler ghostscript libraw libspectre xineLib libwebp curl libdrm
+    libinput utillinux fribidi SDL2 ];
+
+  # as of 1.21.0 compilation will fail due to -Werror=format-security
+  hardeningDisable = [ "format" ];
+
+  # ac_ct_CXX must be set to random value, because then it skips some magic which does alternative searching for g++
+  configureFlags = [
+    "--enable-sdl"
+    "--enable-drm"
+    "--enable-elput"
+    "--with-opengl=full"
+    "--enable-image-loader-jp2k"
+    "--enable-xinput22"
+    "--enable-multisense"
+    "--enable-liblz4"
+    "--enable-systemd"
+    "--enable-image-loader-webp"
+    "--enable-harfbuzz"
+    "--enable-xine"
+    "--enable-fb"
+    "--disable-tslib"
+    "--with-systemdunitdir=$out/systemd/user"
+    "ac_ct_CXX=foo"
+  ];
+
+  patches = [ ./efl-elua.patch ];
+
+  # bin/edje_cc creates $HOME/.run, which would break build of reverse dependencies.
+  setupHook = writeText "setupHook.sh" ''
+    export HOME="$TEMPDIR"
+  '';
+
+  preConfigure = ''
+    export LD_LIBRARY_PATH="$(pwd)/src/lib/eina/.libs:$LD_LIBRARY_PATH"
+    source "$setupHook"
+  '';
+
+  NIX_CFLAGS_COMPILE = [ "-DluaL_reg=luaL_Reg" ]; # needed since luajit-2.1.0-beta3
+
+  postInstall = ''
+    substituteInPlace "$out/share/elua/core/util.lua" --replace '$out' "$out"
+    modules=$(for i in "$out/include/"*/; do printf ' -I''${includedir}/'`basename $i`; done)
+    substituteInPlace "$out/lib/pkgconfig/efl.pc" --replace 'Cflags: -I''${includedir}/efl-1' \
+      'Cflags: -I''${includedir}/eina-1/eina'"$modules"
+
+    # build icon cache
+    gtk-update-icon-cache "$out"/share/icons/Enlightenment-X
+  '';
+
+  # EFL applications depend on libcurl, although it is linked at
+  # runtime by hand in code (it is dlopened).
+  postFixup = ''
+    patchelf --add-needed ${curl.out}/lib/libcurl.so $out/lib/libecore_con.so
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Enlightenment foundation libraries";
+    homepage = http://enlightenment.org/;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.lgpl3;
+    maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/enlightenment/elementary.patch b/nixpkgs/pkgs/desktops/enlightenment/elementary.patch
new file mode 100644
index 000000000000..32080c81cb38
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/elementary.patch
@@ -0,0 +1,18 @@
+--- a/elementary.pc.in	2015-05-16 21:08:14.321148417 +0200
++++ b/elementary.pc.in	2015-05-16 21:08:30.643412725 +0200
+@@ -14,4 +14,4 @@
+ Requires.private: @requirement_elm_pc@
+ Version: @VERSION@
+ Libs: -L${libdir} -lelementary @ELEMENTARY_PC_LIBS@
+-Cflags: -I${includedir}/elementary-@VMAJ@
++Cflags: -I${includedir}/elementary-@VMAJ@ @ELEMENTARY_PC_CFLAGS@
+--- a/Makefile.am	2015-05-16 21:08:14.322148433 +0200
++++ b/Makefile.am	2015-05-16 21:08:30.643412725 +0200
+@@ -84,6 +84,7 @@
+ -e 's,@requirement_elm_pc\@,$(requirement_elm_pc),g' \
+ -e 's,@ELEMENTARY_LIBS\@,$(ELEMENTARY_LIBS),g' \
+ -e 's,@ELEMENTARY_PC_LIBS\@,$(ELEMENTARY_PC_LIBS),g' \
++-e 's,@ELEMENTARY_PC_CFLAGS\@,$(ELEMENTARY_PC_CFLAGS),g' \
+ < $< > $@ || rm $@
+ 
+ pc_verbose = $(pc_verbose_@AM_V@)
diff --git a/nixpkgs/pkgs/desktops/enlightenment/enlightenment.nix b/nixpkgs/pkgs/desktops/enlightenment/enlightenment.nix
new file mode 100644
index 000000000000..8edf702a24c6
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/enlightenment.nix
@@ -0,0 +1,78 @@
+{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, efl,
+  xcbutilkeysyms, libXrandr, libXdmcp, libxcb, libffi, pam, alsaLib,
+  luajit, bzip2, libpthreadstubs, gdbm, libcap, mesa_noglu,
+  xkeyboard_config, pcre
+}:
+
+stdenv.mkDerivation rec {
+  name = "enlightenment-${version}";
+  version = "0.22.4";
+
+  src = fetchurl {
+    url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
+    sha256 = "0ygy891rrw5c7lhk539nhif77j88phvz2h0fhx172iaridy9kx2r";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    (pkgconfig.override { vanilla = true; })
+    gettext
+  ];
+
+  buildInputs = [
+    efl
+    libXdmcp
+    libxcb
+    xcbutilkeysyms
+    libXrandr
+    libffi
+    pam
+    alsaLib
+    luajit
+    bzip2
+    libpthreadstubs
+    gdbm
+    pcre
+    mesa_noglu
+    xkeyboard_config
+  ] ++
+    stdenv.lib.optionals stdenv.isLinux [ libcap ];
+
+  patches = [
+    # Some programs installed by enlightenment (to set the cpu frequency,
+    # for instance) need root ownership and setuid/setgid permissions, which
+    # are not allowed for files in /nix/store. Instead of allowing the
+    # installer to try to do this, the file $out/e-wrappers.nix is created,
+    # containing the needed configuration for wrapping those programs. It
+    # can be used in the enlightenment module. The idea is:
+    # 
+    #  1) rename the original binary adding the extension .orig
+    #  2) wrap the renamed binary at /run/wrappers/bin/
+    #  3) create a new symbolic link using the original binary name (in the
+    #     original directory where enlightenment wants it) pointing to the
+    #     wrapper
+
+    ./enlightenment.suid-exes.patch
+  ];
+
+  postPatch = ''
+    # edge_cc is a binary provided by efl and cannot be found at the directory
+    # given by e_prefix_bin_get(), which is $out/bin
+
+    substituteInPlace src/bin/e_import_config_dialog.c \
+      --replace "e_prefix_bin_get()" "\"${efl}/bin\""
+  '';
+
+  mesonFlags = [ "-Dsystemdunitdir=lib/systemd/user" ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "The Compositing Window Manager and Desktop Shell";
+    homepage = https://www.enlightenment.org;
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ matejc tstrobel ftrvxmtrx romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/enlightenment/enlightenment.suid-exes.patch b/nixpkgs/pkgs/desktops/enlightenment/enlightenment.suid-exes.patch
new file mode 100644
index 000000000000..f53f6ffa7ca8
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/enlightenment.suid-exes.patch
@@ -0,0 +1,25 @@
+--- enlightenment-0.22.0.orig/meson/meson_inst.sh	2017-09-25 10:55:43.000000000 -0300
++++ enlightenment-0.22.0/meson/meson_inst.sh	2017-11-15 08:31:03.336844920 -0200
+@@ -1,6 +1,19 @@
+-#!/bin/sh
++#!/bin/sh -x
++
++w="$out"/e-wrappers.nix
++
++echo "# Wrappers for programs installed by enlightenment that should be setuid" > $w
++echo "" >> $w
++echo "{" >> $w
++echo "  security.wrappers = {" >> $w
+ 
+ for x in "$@" ; do
+-	chown root "$DESTDIR/$x"
+-	chmod a=rx,u+xs "$DESTDIR/$x"
++	f="$DESTDIR$x";
++	b=$(basename "$f".orig)
++	mv -v "$f" "$f".orig
++	ln -sv /run/wrappers/bin/"$b" "$f"
++	echo "    \"$b\".source = \"$f.orig\";" >> $w
+ done
++
++echo "  };" >> $w
++echo "}" >> $w
diff --git a/nixpkgs/pkgs/desktops/enlightenment/ephoto.nix b/nixpkgs/pkgs/desktops/enlightenment/ephoto.nix
new file mode 100644
index 000000000000..ad4620d4f450
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/ephoto.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig, efl, pcre, mesa_noglu, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "ephoto-${version}";
+  version = "1.5";
+  
+  src = fetchurl {
+    url = "http://www.smhouston.us/stuff/${name}.tar.gz";
+    sha256 = "09kraa5zz45728h2dw1ssh23b87j01bkfzf977m48y1r507sy3vb";
+  };
+
+  nativeBuildInputs = [
+    (pkgconfig.override { vanilla = true; })
+    mesa_noglu.dev # otherwise pkg-config does not find gbm
+    makeWrapper
+  ];
+
+  buildInputs = [
+    efl
+    pcre
+  ];
+
+  meta = {
+    description = "Image viewer and editor written using the Enlightenment Foundation Libraries";
+    homepage = http://smhouston.us/ephoto/;
+    license = stdenv.lib.licenses.bsd2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/enlightenment/rage.nix b/nixpkgs/pkgs/desktops/enlightenment/rage.nix
new file mode 100644
index 000000000000..e7dfb5ca3989
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/rage.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, gst_all_1, pcre, mesa_noglu, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  name = "rage-${version}";
+  version = "0.3.0";
+  
+  src = fetchurl {
+    url = "http://download.enlightenment.org/rel/apps/rage/${name}.tar.xz";
+    sha256 = "0gfzdd4jg78bkmj61yg49w7bzspl5m1nh6agqgs8k7qrq9q26xqy";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    (pkgconfig.override { vanilla = true; })
+    mesa_noglu.dev
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    efl
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-bad
+    gst_all_1.gst-libav
+    pcre
+  ];
+
+  meta = {
+    description = "Video + Audio player along the lines of mplayer";
+    homepage = http://enlightenment.org/;
+    maintainers = with stdenv.lib.maintainers; [ matejc ftrvxmtrx romildo ];
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/enlightenment/terminology.nix b/nixpkgs/pkgs/desktops/enlightenment/terminology.nix
new file mode 100644
index 000000000000..5c8aba4d882f
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/enlightenment/terminology.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, pcre, mesa_noglu, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "terminology-${version}";
+  version = "1.4.0";
+
+  src = fetchurl {
+    url = "http://download.enlightenment.org/rel/apps/terminology/${name}.tar.xz";
+    sha256 = "0q1y7fadj42n23aspx9y8hm4w4xlc316wc3415wnf75ibsx08ngd";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    (pkgconfig.override { vanilla = true; })
+    makeWrapper
+  ];
+
+  buildInputs = [
+    efl
+    pcre
+    mesa_noglu
+  ];
+
+  meta = {
+    description = "Powerful terminal emulator based on EFL";
+    homepage = https://www.enlightenment.org/about-terminology;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.bsd2;
+    maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
+  };
+}