mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
enlightenment: 0.21.10 -> 0.22.0
- Update to version 0.22.0 - Switch build tools from autotools to meson - Change handling of setuid programs
This commit is contained in:
parent
6587bcb023
commit
c42a0fbf09
3 changed files with 60 additions and 30 deletions
|
@ -61,7 +61,7 @@ in
|
||||||
'';
|
'';
|
||||||
}];
|
}];
|
||||||
|
|
||||||
security.wrappers.e_freqset.source = "${e.enlightenment.out}/bin/e_freqset";
|
security.wrappers = (import (builtins.toPath "${e.enlightenment}/e-wrappers.nix")).security.wrappers;
|
||||||
|
|
||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ source = xcfg.xkbDir;
|
{ source = xcfg.xkbDir;
|
||||||
|
|
|
@ -1,51 +1,56 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, efl, xcbutilkeysyms, libXrandr, libXdmcp,
|
{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, efl,
|
||||||
libxcb, libffi, pam, alsaLib, luajit, bzip2, libpthreadstubs, gdbm, libcap,
|
xcbutilkeysyms, libXrandr, libXdmcp, libxcb, libffi, pam, alsaLib,
|
||||||
mesa_glu, xkeyboard_config, pcre }:
|
luajit, bzip2, libpthreadstubs, gdbm, libcap, mesa_glu,
|
||||||
|
xkeyboard_config, pcre
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "enlightenment-${version}";
|
name = "enlightenment-${version}";
|
||||||
version = "0.21.10";
|
version = "0.22.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
|
url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
|
||||||
sha256 = "053zmlpjx45xg2rbbxyjh0phhgbsnmsnypzz2bib545klp51bfcv";
|
sha256 = "0xmrvryr35idd7fyqgshfhvy2053bs3vwrxbx681pi6rgpdvjghv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ (pkgconfig.override { vanilla = true; }) ];
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
(pkgconfig.override { vanilla = true; })
|
||||||
|
gettext
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
efl libXdmcp libxcb xcbutilkeysyms libXrandr libffi pam alsaLib
|
efl
|
||||||
luajit bzip2 libpthreadstubs gdbm pcre
|
libXdmcp
|
||||||
|
libxcb
|
||||||
|
xcbutilkeysyms
|
||||||
|
libXrandr
|
||||||
|
libffi
|
||||||
|
pam
|
||||||
|
alsaLib
|
||||||
|
luajit
|
||||||
|
bzip2
|
||||||
|
libpthreadstubs
|
||||||
|
gdbm
|
||||||
|
pcre
|
||||||
] ++
|
] ++
|
||||||
stdenv.lib.optionals stdenv.isLinux [ libcap ];
|
stdenv.lib.optionals stdenv.isLinux [ libcap ];
|
||||||
|
|
||||||
preConfigure = ''
|
# Instead of setting owner to root and permissions to setuid/setgid
|
||||||
export USER_SESSION_DIR=$prefix/lib/systemd/user
|
# (which is not allowed for files in /nix/store) of some
|
||||||
|
# enlightenment programs, the file $out/e-wrappers.nix is created,
|
||||||
|
# containing the needed configuration for that purpose. It can be
|
||||||
|
# used in the enlightenment module.
|
||||||
|
patches = [ ./enlightenment.suid-exes.patch ];
|
||||||
|
|
||||||
substituteInPlace src/modules/xkbswitch/e_mod_parse.c \
|
mesonFlags = [ "-Dsystemdunitdir=lib/systemd/user" ];
|
||||||
--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;
|
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; {
|
meta = with stdenv.lib; {
|
||||||
description = "The Compositing Window Manager and Desktop Shell";
|
description = "The Compositing Window Manager and Desktop Shell";
|
||||||
homepage = http://enlightenment.org/;
|
homepage = https://www.enlightenment.org;
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ matejc tstrobel ftrvxmtrx romildo ];
|
maintainers = with maintainers; [ matejc tstrobel ftrvxmtrx romildo ];
|
||||||
|
|
25
pkgs/desktops/enlightenment/enlightenment.suid-exes.patch
Normal file
25
pkgs/desktops/enlightenment/enlightenment.suid-exes.patch
Normal file
|
@ -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-12 09:04:33.356050746 -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"{,.orig}
|
||||||
|
+ ln -sv /run/wrappers/bin/"$b" "$f"
|
||||||
|
+ echo " \"$b\".source = \"$f\";" >> $w
|
||||||
|
done
|
||||||
|
+
|
||||||
|
+echo " };" >> $w
|
||||||
|
+echo "}" >> $w
|
Loading…
Add table
Add a link
Reference in a new issue