summary refs log tree commit diff
path: root/pkgs/desktops/e18
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-28 11:30:31 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-28 11:30:49 +0200
commitf64d84698eb3f4d833e846336ff99a73331c31f7 (patch)
tree1120886b680851bc8b8f8d337af3503ecd4a3d71 /pkgs/desktops/e18
parent3e4a382d6753a057256c7ef1e9f52ae9e07bd677 (diff)
parent30431e71608576baf880567b2894ad2a542f8d5e (diff)
downloadnixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.tar
nixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.tar.gz
nixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.tar.bz2
nixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.tar.lz
nixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.tar.xz
nixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.tar.zst
nixpkgs-f64d84698eb3f4d833e846336ff99a73331c31f7.zip
Merge remote-tracking branch 'origin/master' into staging
Conflicts:
	pkgs/applications/audio/espeak/edit.nix
	pkgs/applications/audio/lmms/default.nix
	pkgs/desktops/e18/enlightenment.nix
	pkgs/games/exult/default.nix
	pkgs/os-specific/linux/alsa-plugins/default.nix
Diffstat (limited to 'pkgs/desktops/e18')
-rw-r--r--pkgs/desktops/e18/enlightenment.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/desktops/e18/enlightenment.nix b/pkgs/desktops/e18/enlightenment.nix
index e51a61209e2..c3cd585e525 100644
--- a/pkgs/desktops/e18/enlightenment.nix
+++ b/pkgs/desktops/e18/enlightenment.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, e18, xlibs, libffi, pam, alsaLib, luajit, bzip2 }:
+{ stdenv, fetchurl, pkgconfig, e18, xlibs, libffi, pam, alsaLib, luajit, bzip2, set_freqset_setuid ? false }:
+
 stdenv.mkDerivation rec {
   name = "enlightenment-${version}";
   version = "0.18.8";
@@ -10,6 +11,20 @@ stdenv.mkDerivation rec {
   preConfigure = ''
     export NIX_CFLAGS_COMPILE="-I${e18.efl}/include/eo-1 -I${e18.efl}/include/ecore-imf-1 -I${e18.efl}/include/ethumb-client-1 -I${e18.efl}/include/ethumb-1 $NIX_CFLAGS_COMPILE"
   '';
+
+  # this is a hack and without this cpufreq module is not working:
+  #   when set_freqset_setuid is true and "e18_freqset" is set in setuidPrograms (this is taken care of in e18 NixOS module),
+  #   then this postInstall does the folowing:
+  #   1. moves the "freqset" binary to "e18_freqset",
+  #   2. linkes "e18_freqset" to enlightenment/bin so that,
+  #   3. setuidPrograms detects it and makes appropriate stuff to /var/setuid-wrappers/e18_freqset,
+  #   4. and finaly, linkes /var/setuid-wrappers/e18_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/e18_freqset
+    ln -sv $CPUFREQ_DIRPATH/e18_freqset $out/bin/e18_freqset
+    ln -sv /var/setuid-wrappers/e18_freqset $CPUFREQ_DIRPATH/freqset
+  '' else "";
   meta = {
     description = "The Compositing Window Manager and Desktop Shell";
     homepage = http://enlightenment.org/;