summary refs log tree commit diff
path: root/pkgs/desktops/enlightenment/enlightenment/default.nix
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <malaquias@gmail.com>2020-07-31 09:25:54 -0300
committerJosé Romildo Malaquias <malaquias@gmail.com>2020-08-01 20:05:35 -0300
commitf9d16d59f6351bcc24d2791a325798471f2b3d2e (patch)
tree5f08dd76bf97bbc18e1698ca1f0844bd8a6fb000 /pkgs/desktops/enlightenment/enlightenment/default.nix
parent81dd022471943861f11a0907661af57fbdb7a8a6 (diff)
downloadnixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.tar
nixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.tar.gz
nixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.tar.bz2
nixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.tar.lz
nixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.tar.xz
nixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.tar.zst
nixpkgs-f9d16d59f6351bcc24d2791a325798471f2b3d2e.zip
enlightenment.enlightenment: move to pkgs/desktops/enlightenment/enlightenment/
Diffstat (limited to 'pkgs/desktops/enlightenment/enlightenment/default.nix')
-rw-r--r--pkgs/desktops/enlightenment/enlightenment/default.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/desktops/enlightenment/enlightenment/default.nix b/pkgs/desktops/enlightenment/enlightenment/default.nix
new file mode 100644
index 00000000000..90a15a1d523
--- /dev/null
+++ b/pkgs/desktops/enlightenment/enlightenment/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gettext
+, alsaLib
+, acpid
+, bc
+, ddcutil
+, efl
+, pam
+, xkeyboard_config
+, udisks2
+
+, bluetoothSupport ? true, bluez5
+, pulseSupport ? !stdenv.isDarwin, libpulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "enlightenment";
+  version = "0.24.2";
+
+  src = fetchurl {
+    url = "http://download.enlightenment.org/rel/apps/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "1wfz0rwwsx7c1mkswn4hc9xw1i6bsdirhxiycf7ha2vcipqy465y";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsaLib
+    acpid # for systems with ACPI for lid events, AC/Battery plug in/out etc
+    bc # for the Everything module calculator mode
+    ddcutil # specifically libddcutil.so.2 for backlight control
+    efl
+    pam
+    xkeyboard_config
+    udisks2 # for removable storage mounting/unmounting
+  ]
+  ++ stdenv.lib.optional bluetoothSupport bluez5 # for bluetooth configuration and control
+  ++ stdenv.lib.optional pulseSupport libpulseaudio # for proper audio device control and redirection
+  ;
+
+  patches = [
+    # Executables cannot be made setuid in nix store. They should be
+    # wrapped in the enlightenment service module, and the wrapped
+    # executables should be used instead.
+    ./0001-wrapped-setuid-executables.patch
+    ./0003-setuid-missing-path.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace src/modules/everything/evry_plug_calc.c \
+      --replace "ecore_exe_pipe_run(\"bc -l\"" "ecore_exe_pipe_run(\"${bc}/bin/bc -l\""
+  '';
+
+  mesonFlags = [
+    "-D systemdunitdir=lib/systemd/user"
+  ];
+
+  passthru.providedSessions = [ "enlightenment" ];
+
+  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 ];
+  };
+}