1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 00:54:11 +00:00
nixpkgs/pkgs/desktops/enlightenment/enlightenment.nix
romildo 7ffee4de3c efl: use vanilla pkg-config
Use vanilla pkg-config to build EFL applications.

The EFL library has a set of pkg-config files (*.pc) which uses
private requirements. The default pkg-config setup on nixpkgs is
patched to disable resolving those requirements. See
http://bugs.freedesktop.org/show_bug.cgi?id=4738 for reference.

As a consequence each package depending on efl has to explicitly set
the search path in order to be able to find the corresponding header
files.

By using vanilla pkg-config this is not necessary (and this is the
expected behaviour for pkg-config), allowing simpler nix expressions.
2017-08-22 15:54:56 -03:00

54 lines
2 KiB
Nix

{ stdenv, fetchurl, pkgconfig, efl, xcbutilkeysyms, libXrandr, libXdmcp,
libxcb, libffi, pam, alsaLib, luajit, bzip2, libpthreadstubs, gdbm, libcap,
mesa_glu, xkeyboard_config, pcre }:
stdenv.mkDerivation rec {
name = "enlightenment-${version}";
version = "0.21.9";
src = fetchurl {
url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
sha256 = "0w5f3707hyfc20i6xqh4jlr5p2yhy1z794061mjsz2rp4w00qmpb";
};
nativeBuildInputs = [ (pkgconfig.override { vanilla = true; }) ];
buildInputs = [
efl libXdmcp libxcb xcbutilkeysyms libXrandr libffi pam alsaLib
luajit bzip2 libpthreadstubs gdbm pcre
] ++
stdenv.lib.optionals stdenv.isLinux [ libcap ];
preConfigure = ''
export USER_SESSION_DIR=$prefix/lib/systemd/user
substituteInPlace src/modules/xkbswitch/e_mod_parse.c \
--replace "/usr/share/X11/xkb/rules/xorg.lst" "${xkeyboard_config}/share/X11/xkb/rules/base.lst"
substituteInPlace "src/bin/e_import_config_dialog.c" \
--replace "e_prefix_bin_get()" "\"${efl}/bin\""
'';
enableParallelBuilding = true;
# this is a hack and without this cpufreq module is not working. does the following:
# 1. moves the "freqset" binary to "e_freqset",
# 2. linkes "e_freqset" to enlightenment/bin so that,
# 3. wrappers.setuid detects it and places wrappers in /run/wrappers/bin/e_freqset,
# 4. and finally, links /run/wrappers/bin/e_freqset to original destination where enlightenment wants it
postInstall = ''
export CPUFREQ_DIRPATH=`readlink -f $out/lib/enlightenment/modules/cpufreq/linux-gnu-*`;
mv $CPUFREQ_DIRPATH/freqset $CPUFREQ_DIRPATH/e_freqset
ln -sv $CPUFREQ_DIRPATH/e_freqset $out/bin/e_freqset
ln -sv /run/wrappers/bin/e_freqset $CPUFREQ_DIRPATH/freqset
'';
meta = with stdenv.lib; {
description = "The Compositing Window Manager and Desktop Shell";
homepage = http://enlightenment.org/;
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ matejc tstrobel ftrvxmtrx romildo ];
};
}