2015-09-15 11:26:18 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, e19, xorg, libffi, pam, alsaLib, luajit, bzip2
|
2014-12-17 10:32:48 +01:00
|
|
|
, libpthreadstubs, gdbm, libcap, mesa_glu, xkeyboard_config, set_freqset_setuid ? false }:
|
2014-09-15 21:54:02 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "enlightenment-${version}";
|
2015-08-03 18:27:19 +02:00
|
|
|
version = "0.19.8";
|
2014-09-15 21:54:02 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
|
2015-08-03 18:27:19 +02:00
|
|
|
sha256 = "1y83jnq01k9i328adgjgpfwgpvvd2a1ixpm029pjcar8p1mvgadi";
|
2014-09-15 21:54:02 +02:00
|
|
|
};
|
2015-09-15 11:26:18 +02:00
|
|
|
buildInputs = [ pkgconfig e19.efl e19.elementary xorg.libXdmcp xorg.libxcb
|
|
|
|
xorg.xcbutilkeysyms xorg.libXrandr libffi pam alsaLib luajit bzip2
|
2014-12-17 10:32:48 +01:00
|
|
|
libpthreadstubs gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];
|
2015-05-16 16:42:40 +02:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${e19.efl}/include/eo-1" "-I${e19.efl}/include/emile-1" ];
|
2014-09-15 21:54:02 +02:00
|
|
|
preConfigure = ''
|
|
|
|
export USER_SESSION_DIR=$prefix/lib/systemd/user
|
2014-12-17 10:33:49 +01:00
|
|
|
|
|
|
|
substituteInPlace src/modules/xkbswitch/e_mod_parse.c \
|
|
|
|
--replace "/usr/share/X11/xkb/rules/xorg.lst" "${xkeyboard_config}/share/X11/xkb/rules/base.lst"
|
2015-01-10 03:58:14 +01:00
|
|
|
|
|
|
|
substituteInPlace "src/bin/e_import_config_dialog.c" \
|
|
|
|
--replace "e_prefix_bin_get()" "\"${e19.efl}/bin\""
|
2014-09-15 21:54:02 +02:00
|
|
|
'';
|
|
|
|
|
2014-12-28 11:40:01 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-09-15 21:54:02 +02:00
|
|
|
# this is a hack and without this cpufreq module is not working:
|
|
|
|
# when set_freqset_setuid is true and "e19_freqset" is set in setuidPrograms (this is taken care of in e19 NixOS module),
|
|
|
|
# then this postInstall does the folowing:
|
|
|
|
# 1. moves the "freqset" binary to "e19_freqset",
|
|
|
|
# 2. linkes "e19_freqset" to enlightenment/bin so that,
|
|
|
|
# 3. setuidPrograms detects it and makes appropriate stuff to /var/setuid-wrappers/e19_freqset,
|
|
|
|
# 4. and finaly, linkes /var/setuid-wrappers/e19_freqset to original destination where enlightenment wants it
|
|
|
|
postInstall = if set_freqset_setuid then ''
|
|
|
|
export CPUFREQ_DIRPATH=`readlink -f $out/lib/enlightenment/modules/cpufreq/linux-gnu-*`;
|
|
|
|
mv $CPUFREQ_DIRPATH/freqset $CPUFREQ_DIRPATH/e19_freqset
|
|
|
|
ln -sv $CPUFREQ_DIRPATH/e19_freqset $out/bin/e19_freqset
|
|
|
|
ln -sv /var/setuid-wrappers/e19_freqset $CPUFREQ_DIRPATH/freqset
|
|
|
|
'' else "";
|
|
|
|
meta = {
|
|
|
|
description = "The Compositing Window Manager and Desktop Shell";
|
|
|
|
homepage = http://enlightenment.org/;
|
2015-05-16 16:42:40 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
|
2014-09-15 21:54:02 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
license = stdenv.lib.licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|