From 81dd022471943861f11a0907661af57fbdb7a8a6 Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Fri, 31 Jul 2020 09:21:16 -0300 Subject: enlightenment.efl: move to pkgs/desktops/enlightenment/efl/ --- .../0002-efreet-more-stat-info-changes.patch | 623 --------------------- pkgs/desktops/enlightenment/default.nix | 2 +- pkgs/desktops/enlightenment/efl-elua.patch | 14 - pkgs/desktops/enlightenment/efl.nix | 205 ------- .../efl/0002-efreet-more-stat-info-changes.patch | 623 +++++++++++++++++++++ pkgs/desktops/enlightenment/efl/default.nix | 205 +++++++ pkgs/desktops/enlightenment/efl/efl-elua.patch | 14 + 7 files changed, 843 insertions(+), 843 deletions(-) delete mode 100644 pkgs/desktops/enlightenment/0002-efreet-more-stat-info-changes.patch delete mode 100644 pkgs/desktops/enlightenment/efl-elua.patch delete mode 100644 pkgs/desktops/enlightenment/efl.nix create mode 100644 pkgs/desktops/enlightenment/efl/0002-efreet-more-stat-info-changes.patch create mode 100644 pkgs/desktops/enlightenment/efl/default.nix create mode 100644 pkgs/desktops/enlightenment/efl/efl-elua.patch (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/enlightenment/0002-efreet-more-stat-info-changes.patch b/pkgs/desktops/enlightenment/0002-efreet-more-stat-info-changes.patch deleted file mode 100644 index e0005e430b2e3..0000000000000 --- a/pkgs/desktops/enlightenment/0002-efreet-more-stat-info-changes.patch +++ /dev/null @@ -1,623 +0,0 @@ - - - - -diff --git a/src/bin/efreet/efreet_icon_cache_create.c b/src/bin/efreet/efreet_icon_cache_create.c -index 6810ca684e..6478df4dbd 100644 ---- a/src/bin/efreet/efreet_icon_cache_create.c -+++ b/src/bin/efreet/efreet_icon_cache_create.c -@@ -38,38 +38,36 @@ static Eina_Hash *icon_themes = NULL; - static Eina_Bool - cache_directory_modified(Eina_Hash *dirs, const char *dir) - { -- Efreet_Cache_Directory *dcache; -- long long time; -- -- if (!dirs) return EINA_TRUE; -- -- time = ecore_file_mod_time(dir); -- if (!time) -- return EINA_FALSE; -- dcache = eina_hash_find(dirs, dir); -- if (!dcache) -- { -+ Efreet_Cache_Directory *dcache; -+ Efreet_Cache_Check check; -+ -+ if (!dirs) return EINA_TRUE; -+ if (!efreet_file_cache_fill(dir, &check)) return EINA_FALSE; -+ dcache = eina_hash_find(dirs, dir); -+ if (!dcache) -+ { - dcache = malloc(sizeof (Efreet_Cache_Directory)); - if (!dcache) return EINA_TRUE; -- -- dcache->modified_time = time; -+ dcache->check = check; - eina_hash_add(dirs, dir, dcache); -- } -- else if (dcache->modified_time == time) return EINA_FALSE; -- dcache->modified_time = time; -- -- return EINA_TRUE; -+ } -+ else if (efreet_file_cache_check(&check, &dcache->check)) -+ return EINA_FALSE; -+ else -+ dcache->check = check; -+ return EINA_TRUE; - } - - static Eina_Bool - cache_extension_lookup(const char *ext) - { -- unsigned int i; -+ unsigned int i; - -- for (i = 0; i < exts->count; ++i) -- if (!strcmp(exts->data[i], ext)) -- return EINA_TRUE; -- return EINA_FALSE; -+ for (i = 0; i < exts->count; ++i) -+ { -+ if (!strcmp(exts->data[i], ext)) return EINA_TRUE; -+ } -+ return EINA_FALSE; - } - - static Eina_Bool -@@ -223,6 +221,37 @@ check_fallback_changed(Efreet_Cache_Icon_Theme *theme) - return EINA_FALSE; - } - -+typedef struct -+{ -+ char *path; -+ int name_start; -+} Scanned_Entry; -+ -+static Eina_Hash *already_scanned_path = NULL; -+ -+static void -+cache_theme_change_verify(Efreet_Cache_Icon_Theme *theme) -+{ -+ Eina_Bool changed = EINA_FALSE; -+ Eina_List *l; -+ Efreet_Icon_Theme_Directory *d; -+ char buf[PATH_MAX], *tdir, *sep; -+ -+ tdir = strdup(theme->path); -+ sep = strrchr(tdir, '/'); -+ if (sep) *sep = 0; -+ EINA_LIST_FOREACH(theme->theme.directories, l, d) -+ { -+ snprintf(buf, sizeof(buf), "%s/%s", tdir, d->name); -+ if (cache_directory_modified(theme->dirs, buf)) -+ { -+ changed = EINA_TRUE; -+ } -+ } -+ free(tdir); -+ if (changed) theme->changed = changed; -+} -+ - static Eina_Bool - cache_scan_path_dir(Efreet_Icon_Theme *theme, - const char *path, -@@ -232,29 +261,63 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, - Eina_Iterator *it; - char buf[PATH_MAX]; - Eina_File_Direct_Info *entry; -+ Eina_List *dirs = NULL; -+ Eina_List *l; -+ char *ext; -+ Scanned_Entry *scentry; - - snprintf(buf, sizeof(buf), "%s/%s", path, dir->name); -+ // we wont ever free this - no point -+ if (!already_scanned_path) -+ already_scanned_path = eina_hash_string_superfast_new(NULL); -+ dirs = eina_hash_find(already_scanned_path, buf); -+ if ((intptr_t)dirs == (intptr_t)(-1L)) return EINA_TRUE; -+ else if (!dirs) -+ { -+ it = eina_file_stat_ls(buf); -+ if (!it) -+ { -+ eina_hash_add(already_scanned_path, buf, (void *)(intptr_t)(-1L)); -+ return EINA_TRUE; -+ } -+ -+ EINA_ITERATOR_FOREACH(it, entry) -+ { -+ if (entry->type == EINA_FILE_DIR) continue; -+ ext = strrchr(entry->path + entry->name_start, '.'); -+ if (!ext || !cache_extension_lookup(ext)) continue; -+ scentry = malloc(sizeof(Scanned_Entry)); -+ if (!scentry) -+ { -+ ERR("Out of memory"); -+ exit(1); -+ } -+ scentry->name_start = entry->name_start; -+ scentry->path = strdup(entry->path); -+ if (!scentry->path) -+ { -+ ERR("Out of memory"); -+ exit(1); -+ } -+ dirs = eina_list_append(dirs, scentry); -+ } -+ eina_iterator_free(it); -+ if (dirs) -+ eina_hash_add(already_scanned_path, buf, dirs); -+ else -+ eina_hash_add(already_scanned_path, buf, (void *)(intptr_t)(-1L)); -+ } - -- it = eina_file_stat_ls(buf); -- if (!it) return EINA_TRUE; -- -- EINA_ITERATOR_FOREACH(it, entry) -+ EINA_LIST_FOREACH(dirs, l, scentry) - { - Efreet_Cache_Icon *icon; - char *name; -- char *ext; - const char **tmp; - unsigned int i; - -- if (entry->type == EINA_FILE_DIR) -- continue; -- -- ext = strrchr(entry->path + entry->name_start, '.'); -- if (!ext || !cache_extension_lookup(ext)) -- continue; -- -+ ext = strrchr(scentry->path + scentry->name_start, '.'); - /* icon with known extension */ -- name = entry->path + entry->name_start; -+ name = scentry->path + scentry->name_start; - *ext = '\0'; - - icon = eina_hash_find(icons, name); -@@ -284,7 +347,7 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, - - /* check if the path already exist */ - for (j = 0; j < icon->icons[i]->paths_count; ++j) -- if (!strcmp(icon->icons[i]->paths[j], entry->path)) -+ if (!strcmp(icon->icons[i]->paths[j], scentry->path)) - break; - - if (j != icon->icons[i]->paths_count) -@@ -348,12 +411,9 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, - exit(1); - } - icon->icons[i]->paths = tmp; -- icon->icons[i]->paths[icon->icons[i]->paths_count] = eina_stringshare_add(entry->path); -+ icon->icons[i]->paths[icon->icons[i]->paths_count] = eina_stringshare_add(scentry->path); - eina_array_push(strs, icon->icons[i]->paths[icon->icons[i]->paths_count++]); - } -- -- eina_iterator_free(it); -- - return EINA_TRUE; - } - -@@ -364,7 +424,9 @@ cache_scan_path(Efreet_Icon_Theme *theme, Eina_Hash *icons, const char *path) - Efreet_Icon_Theme_Directory *dir; - - EINA_LIST_FOREACH(theme->directories, l, dir) -+ { - if (!cache_scan_path_dir(theme, path, dir, icons)) return EINA_FALSE; -+ } - - return EINA_TRUE; - } -@@ -511,13 +573,13 @@ icon_theme_index_read(Efreet_Cache_Icon_Theme *theme, const char *path) - Efreet_Ini *ini; - Efreet_Icon_Theme_Directory *dir; - const char *tmp; -- long long time; -+ Efreet_Cache_Check check; - - if (!theme || !path) return EINA_FALSE; - -- time = ecore_file_mod_time(path); -- if (!time) return EINA_FALSE; -- if (theme->path && !strcmp(theme->path, path) && theme->last_cache_check >= time) -+ if (!efreet_file_cache_fill(path, &check)) return EINA_FALSE; -+ if (theme->path && !strcmp(theme->path, path) && -+ efreet_file_cache_check(&check, &(theme->check))) - { - /* no change */ - theme->valid = 1; -@@ -528,8 +590,7 @@ icon_theme_index_read(Efreet_Cache_Icon_Theme *theme, const char *path) - theme->path = eina_stringshare_add(path); - eina_array_push(strs, theme->path); - } -- if (time > theme->last_cache_check) -- theme->last_cache_check = time; -+ theme->check = check; - theme->changed = 1; - - ini = efreet_ini_new(path); -@@ -644,10 +705,10 @@ cache_theme_scan(const char *dir) - Efreet_Cache_Icon_Theme *theme; - const char *name; - const char *path; -- long long time; -+ Efreet_Cache_Check check; -+ Efreet_Cache_Directory *d; - -- time = ecore_file_mod_time(entry->path); -- if (!time) continue; -+ if (!efreet_file_cache_fill(entry->path, &check)) continue; - - if ((entry->type != EINA_FILE_DIR) && - (entry->type != EINA_FILE_LNK)) -@@ -669,10 +730,26 @@ cache_theme_scan(const char *dir) - (void *)theme->theme.name.internal, theme); - theme->changed = 1; - } -- if (time > theme->last_cache_check) -- { -- theme->last_cache_check = time; -+ -+ d = NULL; -+ if (theme->dirs) -+ d = eina_hash_find(theme->dirs, entry->path); -+ if (!d) -+ { -+ if (!theme->dirs) -+ theme->dirs = eina_hash_string_superfast_new(NULL); - theme->changed = 1; -+ d = NEW(Efreet_Cache_Directory, 1); -+ d->check = check; -+ eina_hash_add(theme->dirs, entry->path, d); -+ } -+ else -+ { -+ if (!efreet_file_cache_check(&check, &(d->check))) -+ { -+ d->check = check; -+ theme->changed = 1; -+ } - } - - /* TODO: We need to handle change in order of included paths */ -@@ -732,8 +809,7 @@ icon_theme_free(Efreet_Cache_Icon_Theme *theme) - - eina_list_free(theme->theme.paths); - eina_list_free(theme->theme.inherits); -- EINA_LIST_FREE(theme->theme.directories, data) -- free(data); -+ EINA_LIST_FREE(theme->theme.directories, data) free(data); - if (theme->dirs) efreet_hash_free(theme->dirs, free); - free(theme); - } -@@ -926,7 +1002,7 @@ main(int argc, char **argv) - if (!theme->theme.name.name) continue; - #endif - INF("scan theme %s", theme->theme.name.name); -- -+ cache_theme_change_verify(theme); - theme->changed = check_changed(theme); - if (flush) - theme->changed = EINA_TRUE; -@@ -981,18 +1057,18 @@ main(int argc, char **argv) - - icons_it = eina_hash_iterator_tuple_new(icons); - EINA_ITERATOR_FOREACH(icons_it, tuple) -- eet_data_write(icon_ef, icon_edd, tuple->key, tuple->data, 1); -+ eet_data_write(icon_ef, icon_edd, tuple->key, tuple->data, EET_COMPRESSION_SUPERFAST); - eina_iterator_free(icons_it); - -- INF("theme change: %s %lld", theme->theme.name.internal, theme->last_cache_check); -- eet_data_write(theme_ef, theme_edd, theme->theme.name.internal, theme, 1); -+ INF("theme change: %s %lld", theme->theme.name.internal, theme->check.mtime); -+ eet_data_write(theme_ef, theme_edd, theme->theme.name.internal, theme, EET_COMPRESSION_SUPERFAST); - } - eina_hash_free(themes); - eina_hash_free(icons); - changed = EINA_TRUE; - } - -- eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1); -+ eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, EET_COMPRESSION_SUPERFAST); - eet_close(icon_ef); - efreet_setowner(efreet_icon_cache_file(theme->theme.name.internal)); - free(icon_version); -@@ -1064,17 +1140,17 @@ main(int argc, char **argv) - - icons_it = eina_hash_iterator_tuple_new(icons); - EINA_ITERATOR_FOREACH(icons_it, tuple) -- eet_data_write(icon_ef, fallback_edd, tuple->key, tuple->data, 1); -+ eet_data_write(icon_ef, fallback_edd, tuple->key, tuple->data, EET_COMPRESSION_SUPERFAST); - eina_iterator_free(icons_it); - } - eina_hash_free(icons); - -- eet_data_write(theme_ef, theme_edd, EFREET_CACHE_ICON_FALLBACK, theme, 1); -+ eet_data_write(theme_ef, theme_edd, EFREET_CACHE_ICON_FALLBACK, theme, EET_COMPRESSION_SUPERFAST); - } - - icon_theme_free(theme); - -- eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1); -+ eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, EET_COMPRESSION_SUPERFAST); - eet_close(icon_ef); - efreet_setowner(efreet_icon_cache_file(EFREET_CACHE_ICON_FALLBACK)); - free(icon_version); -@@ -1082,7 +1158,7 @@ main(int argc, char **argv) - eina_hash_free(icon_themes); - - /* save data */ -- eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, 1); -+ eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, EET_COMPRESSION_SUPERFAST); - - eet_close(theme_ef); - theme_ef = NULL; -diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c -index f859c630f0..2b5d0c9f5f 100644 ---- a/src/lib/efreet/efreet_cache.c -+++ b/src/lib/efreet/efreet_cache.c -@@ -1,3 +1,4 @@ -+ - #ifdef HAVE_CONFIG_H - # include - #endif -@@ -536,6 +537,137 @@ efreet_desktop_util_cache_file(void) - /* - * Needs EAPI because of helper binaries - */ -+#define SHSH(n, v) ((((v) << (n)) & 0xffffffff) | ((v) >> (32 - (n)))) -+ -+static inline int -+int_to_bigendian(int in) -+{ -+ static const unsigned char test[4] = { 0x11, 0x22, 0x33, 0x44 }; -+ static const unsigned int *test_i = (const unsigned int *)test; -+ if (test_i[0] == 0x44332211) return eina_swap32(in); -+ return in; -+} -+ -+static void -+sha1(unsigned char *data, int size, unsigned char *dst) -+{ -+ unsigned int digest[5], word[80], wa, wb, wc, wd, we, t; -+ unsigned char buf[64], *d; -+ int idx, left, i; -+ const unsigned int magic[4] = -+ { 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 }; -+ -+ idx = 0; -+ digest[0] = 0x67452301; digest[1] = 0xefcdab89; digest[2] = 0x98badcfe; -+ digest[3] = 0x10325476; digest[4] = 0xc3d2e1f0; -+ -+ memset(buf, 0, sizeof(buf)); -+ for (left = size, d = data; left > 0; left--, d++) -+ { -+ if ((idx == 0) && (left < 64)) -+ { -+ memset(buf, 0, 60); -+ buf[60] = (size >> 24) & 0xff; -+ buf[61] = (size >> 16) & 0xff; -+ buf[62] = (size >> 8) & 0xff; -+ buf[63] = (size) & 0xff; -+ } -+ buf[idx] = *d; -+ idx++; -+ if ((idx == 64) || (left == 1)) -+ { -+ if ((left == 1) && (idx < 64)) buf[idx] = 0x80; -+ for (i = 0; i < 16; i++) -+ { -+ word[i] = (unsigned int)buf[(i * 4) ] << 24; -+ word[i] |= (unsigned int)buf[(i * 4) + 1] << 16; -+ word[i] |= (unsigned int)buf[(i * 4) + 2] << 8; -+ word[i] |= (unsigned int)buf[(i * 4) + 3]; -+ } -+ for (i = 16; i < 80; i++) -+ word[i] = SHSH(1, -+ word[i - 3 ] ^ word[i - 8 ] ^ -+ word[i - 14] ^ word[i - 16]); -+ wa = digest[0]; wb = digest[1]; wc = digest[2]; -+ wd = digest[3]; we = digest[4]; -+ for (i = 0; i < 80; i++) -+ { -+ if (i < 20) -+ t = SHSH(5, wa) + ((wb & wc) | ((~wb) & wd)) + -+ we + word[i] + magic[0]; -+ else if (i < 40) -+ t = SHSH(5, wa) + (wb ^ wc ^ wd) + -+ we + word[i] + magic[1]; -+ else if (i < 60) -+ t = SHSH(5, wa) + ((wb & wc) | (wb & wd) | (wc & wd)) + -+ we + word[i] + magic[2]; -+ else if (i < 80) -+ t = SHSH(5, wa) + (wb ^ wc ^ wd) + -+ we + word[i] + magic[3]; -+ we = wd; -+ wd = wc; -+ wc = SHSH(30, wb); -+ wb = wa; -+ wa = t; -+ } -+ digest[0] += wa; digest[1] += wb; digest[2] += wc; -+ digest[3] += wd; digest[4] += we; -+ idx = 0; -+ } -+ } -+ t = int_to_bigendian(digest[0]); digest[0] = t; -+ t = int_to_bigendian(digest[1]); digest[1] = t; -+ t = int_to_bigendian(digest[2]); digest[2] = t; -+ t = int_to_bigendian(digest[3]); digest[3] = t; -+ t = int_to_bigendian(digest[4]); digest[4] = t; -+ memcpy(dst, digest, 5 * 4); -+} -+ -+EAPI Eina_Bool -+efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check) -+{ -+ struct stat st; -+ ssize_t size = 0; -+ char link[PATH_MAX]; -+ -+ if (lstat(file, &st) != 0) return EINA_FALSE; -+ if (S_ISLNK(st.st_mode)) -+ { -+ size = readlink(file, link, sizeof(link)); -+ if ((size > 0) && ((size_t)size >= sizeof(link))) return EINA_FALSE; -+ if (stat(file, &st) != 0) return EINA_FALSE; -+ } -+ -+ memset(check, 0, sizeof(Efreet_Cache_Check)); -+ if (size > 0) sha1((unsigned char *)link, size, check->link_sha1); -+ else memset(check->link_sha1, 0, sizeof(check->link_sha1)); -+ check->uid = st.st_uid; -+ check->gid = st.st_gid; -+ check->size = st.st_size; -+ check->blocks = st.st_blocks; -+ check->mtime = st.st_mtime; -+ check->chtime = st.st_ctime; -+ check->mode = st.st_mode; -+ return EINA_TRUE; -+} -+ -+EAPI Eina_Bool // true if matches -+efreet_file_cache_check(const Efreet_Cache_Check *check1, const Efreet_Cache_Check *check2) -+{ -+ if ((check1->mtime != check2->mtime ) || -+ (check1->size != check2->size ) || -+ (check1->chtime != check2->chtime ) || -+ (check1->blocks != check2->blocks) || -+ (check1->mode != check2->mode ) || -+ (check1->uid != check2->uid ) || -+ (check1->gid != check2->gid ) || -+ (memcmp(check1->link_sha1, check2->link_sha1, 20) != 0)) -+ { -+ return EINA_FALSE; -+ } -+ return EINA_TRUE; // matches -+} -+ - EAPI Eet_Data_Descriptor * - efreet_version_edd(void) - { -@@ -691,8 +823,22 @@ efreet_icon_directory_edd(void) - directory_edd = eet_data_descriptor_file_new(&eddc); - if (!directory_edd) return NULL; - -- EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -- "modified_time", modified_time, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.uid", check.uid, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.gid", check.gid, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.size", check.size, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.blocks", check.blocks, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.mtime", check.mtime, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.chtime", check.chtime, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, -+ "check.mode", check.mode, EET_T_INT); -+ EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(directory_edd, Efreet_Cache_Directory, -+ "check.link_sha1", check.link_sha1, EET_T_CHAR); - - return directory_edd; - } -@@ -790,7 +936,21 @@ efreet_icon_theme_edd(Eina_Bool cache) - if (cache) - { - EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -- "last_cache_check", last_cache_check, EET_T_LONG_LONG); -+ "check.uid", check.uid, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.gid", check.gid, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.size", check.size, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.blocks", check.blocks, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.mtime", check.mtime, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.chtime", check.chtime, EET_T_LONG_LONG); -+ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.mode", check.mode, EET_T_INT); -+ EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(icon_theme_edd, Efreet_Cache_Icon_Theme, -+ "check.link_sha1", check.link_sha1, EET_T_CHAR); - - EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, - "path", path, EET_T_STRING); -diff --git a/src/lib/efreet/efreet_cache_private.h b/src/lib/efreet/efreet_cache_private.h -index 97dbd45a1e..1edbb3b5ff 100644 ---- a/src/lib/efreet/efreet_cache_private.h -+++ b/src/lib/efreet/efreet_cache_private.h -@@ -38,11 +38,20 @@ - # endif - #endif - -+typedef struct _Efreet_Cache_Check Efreet_Cache_Check; -+ -+typedef struct _Efreet_Cache_Icon_Theme Efreet_Cache_Icon_Theme; -+typedef struct _Efreet_Cache_Directory Efreet_Cache_Directory; -+typedef struct _Efreet_Cache_Desktop Efreet_Cache_Desktop; -+ - EAPI const char *efreet_desktop_util_cache_file(void); - EAPI const char *efreet_desktop_cache_file(void); - EAPI const char *efreet_icon_cache_file(const char *theme); - EAPI const char *efreet_icon_theme_cache_file(void); - -+EAPI Eina_Bool efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check); -+EAPI Eina_Bool efreet_file_cache_check(const Efreet_Cache_Check *check1, const Efreet_Cache_Check *check2); -+ - EAPI Eet_Data_Descriptor *efreet_version_edd(void); - EAPI Eet_Data_Descriptor *efreet_desktop_edd(void); - EAPI Eet_Data_Descriptor *efreet_hash_array_string_edd(void); -@@ -52,15 +61,23 @@ EAPI Eet_Data_Descriptor *efreet_icon_theme_edd(Eina_Bool cache); - EAPI Eet_Data_Descriptor *efreet_icon_edd(void); - EAPI Eet_Data_Descriptor *efreet_icon_fallback_edd(void); - --typedef struct _Efreet_Cache_Icon_Theme Efreet_Cache_Icon_Theme; --typedef struct _Efreet_Cache_Directory Efreet_Cache_Directory; --typedef struct _Efreet_Cache_Desktop Efreet_Cache_Desktop; -+struct _Efreet_Cache_Check -+{ -+ unsigned long long uid; -+ unsigned long long gid; -+ unsigned long long size; -+ unsigned long long blocks; -+ unsigned long long mtime; -+ unsigned long long chtime; -+ unsigned int mode; -+ unsigned char link_sha1[20]; -+}; - - struct _Efreet_Cache_Icon_Theme - { - Efreet_Icon_Theme theme; - -- long long last_cache_check; /**< Last time the cache was checked */ -+ Efreet_Cache_Check check; /**< relevant stat info from last check */ - - Eina_Hash *dirs; /**< All possible icon paths for this theme */ - -@@ -73,13 +90,14 @@ struct _Efreet_Cache_Icon_Theme - - struct _Efreet_Cache_Directory - { -- long long modified_time; -+ Efreet_Cache_Check check; /**< relevant stat info from last check */ - }; - - struct _Efreet_Cache_Desktop - { - Efreet_Desktop desktop; - -+ Efreet_Cache_Check check; /**< relevant stat info from last check */ - double check_time; /**< Last time we check for disk modification */ - }; diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix index dcaf6260f0c42..bdb56e9172d1a 100644 --- a/pkgs/desktops/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/default.nix @@ -1,7 +1,7 @@ { callPackage, pkgs }: { #### CORE EFL - efl = callPackage ./efl.nix { }; + efl = callPackage ./efl { }; #### WINDOW MANAGER enlightenment = callPackage ./enlightenment.nix { }; diff --git a/pkgs/desktops/enlightenment/efl-elua.patch b/pkgs/desktops/enlightenment/efl-elua.patch deleted file mode 100644 index 96c42b3ff3ca1..0000000000000 --- a/pkgs/desktops/enlightenment/efl-elua.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ./src/scripts/elua/core/util.lua.old 2015-05-17 11:59:57.307743243 +0200 -+++ ./src/scripts/elua/core/util.lua 2015-05-17 12:39:11.906797377 +0200 -@@ -159,7 +159,10 @@ - local ev = os.getenv("ELUA_" .. libname:upper() .. "_LIBRARY_PATH") - local succ, v = load_lib(libname, ev) - if not succ then -- error(v, 2) -+ succ, v = load_lib(libname, "$out/lib") -+ if not succ then -+ error(v, 2) -+ end - end - lib = v - loaded_libs[libname] = lib diff --git a/pkgs/desktops/enlightenment/efl.nix b/pkgs/desktops/enlightenment/efl.nix deleted file mode 100644 index 0fa5edc934c48..0000000000000 --- a/pkgs/desktops/enlightenment/efl.nix +++ /dev/null @@ -1,205 +0,0 @@ -{ stdenv -, fetchurl -, meson -, ninja -, pkgconfig -, SDL2 -, alsaLib -, bullet -, check -, curl -, dbus -, doxygen -, expat -, fontconfig -, freetype -, fribidi -, ghostscript -, giflib -, glib -, gst_all_1 -, gtk3 -, harfbuzz -, hicolor-icon-theme -, ibus -, jbig2dec -, libGL -, libdrm -, libinput -, libjpeg -, libpng -, libpulseaudio -, libraw -, librsvg -, libsndfile -, libspectre -, libtiff -, libwebp -, libxkbcommon -, luajit -, lz4 -, mesa -, mint-x-icons -, openjpeg -, openssl -, poppler -, python3Packages -, systemd -, udev -, utillinux -, writeText -, xorg -, zlib -}: - -stdenv.mkDerivation rec { - pname = "efl"; - version = "1.24.3"; - - src = fetchurl { - url = "http://download.enlightenment.org/rel/libs/${pname}/${pname}-${version}.tar.xz"; - sha256 = "de95c6e673c170c1e21382918b122417c091c643e7dcaced89aa785529625c2a"; - }; - - nativeBuildInputs = [ - meson - ninja - gtk3 - pkgconfig - check - ]; - - buildInputs = [ - fontconfig - freetype - giflib - glib - gst_all_1.gst-libav - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gstreamer - ibus - libGL - libpng - libpulseaudio - libsndfile - libtiff - lz4 - mesa - openssl - systemd - udev - xorg.libX11 - xorg.libXcursor - xorg.xorgproto - zlib - # still missing parent icon themes: RAVE-X, Faenza - ]; - - propagatedBuildInputs = [ - SDL2 - alsaLib - bullet - curl - dbus - dbus - doxygen - expat - fribidi - ghostscript - harfbuzz - hicolor-icon-theme # for the icon theme - jbig2dec - libdrm - libinput - libjpeg - libraw - librsvg - libspectre - libwebp - libxkbcommon - luajit - mint-x-icons # Mint-X is a parent icon theme of Enlightenment-X - openjpeg - poppler - utillinux - xorg.libXScrnSaver - xorg.libXcomposite - xorg.libXdamage - xorg.libXext - xorg.libXfixes - xorg.libXi - xorg.libXinerama - xorg.libXrandr - xorg.libXrender - xorg.libXtst - xorg.libxcb - ]; - - dontDropIconThemeCache = true; - - mesonFlags = [ - "--buildtype=release" - "-D build-tests=false" # disable build tests, which are not working - "-D drm=true" - "-D ecore-imf-loaders-disabler=ibus,scim" # ibus is disalbed by default, scim is not availabe in nixpkgs - "-D embedded-lz4=false" - "-D fb=true" - "-D network-backend=connman" - "-D sdl=true" - ]; - - patches = [ - ./efl-elua.patch - ./0002-efreet-more-stat-info-changes.patch - ]; - - postPatch = '' - patchShebangs src/lib/elementary/config_embed - - # fix destination of systemd unit and dbus service - substituteInPlace systemd-services/meson.build --replace "sys_dep.get_pkgconfig_variable('systemduserunitdir')" "'$out/systemd/user'" - substituteInPlace dbus-services/meson.build --replace "dep.get_pkgconfig_variable('session_bus_services_dir')" "'$out/share/dbus-1/services'" - ''; - - # bin/edje_cc creates $HOME/.run, which would break build of reverse dependencies. - setupHook = writeText "setupHook.sh" '' - export HOME="$TEMPDIR" - ''; - - preConfigure = '' - # allow ecore_con to find libcurl.so, which is a runtime dependency (it is dlopened) - export LD_LIBRARY_PATH="${curl.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" - - source "$setupHook" - ''; - - NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 - - postInstall = '' - # fix use of $out variable - substituteInPlace "$out/share/elua/core/util.lua" --replace '$out' "$out" - - # add all module include dirs to the Cflags field in efl.pc - modules=$(for i in "$out/include/"*/; do printf ' -I''${includedir}/'`basename $i`; done) - substituteInPlace "$out/lib/pkgconfig/efl.pc" \ - --replace 'Cflags: -I''${includedir}/efl-1' \ - 'Cflags: -I''${includedir}/eina-1/eina'"$modules" - - # build icon cache - gtk-update-icon-cache "$out"/share/icons/Enlightenment-X - ''; - - postFixup = '' - # EFL applications depend on libcurl, which is linked at runtime by hand in code (it is dlopened) - patchelf --add-needed ${curl.out}/lib/libcurl.so $out/lib/libecore_con.so - ''; - - meta = { - description = "Enlightenment foundation libraries"; - homepage = "https://enlightenment.org/"; - license = stdenv.lib.licenses.lgpl3; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx romildo ]; - }; -} diff --git a/pkgs/desktops/enlightenment/efl/0002-efreet-more-stat-info-changes.patch b/pkgs/desktops/enlightenment/efl/0002-efreet-more-stat-info-changes.patch new file mode 100644 index 0000000000000..e0005e430b2e3 --- /dev/null +++ b/pkgs/desktops/enlightenment/efl/0002-efreet-more-stat-info-changes.patch @@ -0,0 +1,623 @@ + + + + +diff --git a/src/bin/efreet/efreet_icon_cache_create.c b/src/bin/efreet/efreet_icon_cache_create.c +index 6810ca684e..6478df4dbd 100644 +--- a/src/bin/efreet/efreet_icon_cache_create.c ++++ b/src/bin/efreet/efreet_icon_cache_create.c +@@ -38,38 +38,36 @@ static Eina_Hash *icon_themes = NULL; + static Eina_Bool + cache_directory_modified(Eina_Hash *dirs, const char *dir) + { +- Efreet_Cache_Directory *dcache; +- long long time; +- +- if (!dirs) return EINA_TRUE; +- +- time = ecore_file_mod_time(dir); +- if (!time) +- return EINA_FALSE; +- dcache = eina_hash_find(dirs, dir); +- if (!dcache) +- { ++ Efreet_Cache_Directory *dcache; ++ Efreet_Cache_Check check; ++ ++ if (!dirs) return EINA_TRUE; ++ if (!efreet_file_cache_fill(dir, &check)) return EINA_FALSE; ++ dcache = eina_hash_find(dirs, dir); ++ if (!dcache) ++ { + dcache = malloc(sizeof (Efreet_Cache_Directory)); + if (!dcache) return EINA_TRUE; +- +- dcache->modified_time = time; ++ dcache->check = check; + eina_hash_add(dirs, dir, dcache); +- } +- else if (dcache->modified_time == time) return EINA_FALSE; +- dcache->modified_time = time; +- +- return EINA_TRUE; ++ } ++ else if (efreet_file_cache_check(&check, &dcache->check)) ++ return EINA_FALSE; ++ else ++ dcache->check = check; ++ return EINA_TRUE; + } + + static Eina_Bool + cache_extension_lookup(const char *ext) + { +- unsigned int i; ++ unsigned int i; + +- for (i = 0; i < exts->count; ++i) +- if (!strcmp(exts->data[i], ext)) +- return EINA_TRUE; +- return EINA_FALSE; ++ for (i = 0; i < exts->count; ++i) ++ { ++ if (!strcmp(exts->data[i], ext)) return EINA_TRUE; ++ } ++ return EINA_FALSE; + } + + static Eina_Bool +@@ -223,6 +221,37 @@ check_fallback_changed(Efreet_Cache_Icon_Theme *theme) + return EINA_FALSE; + } + ++typedef struct ++{ ++ char *path; ++ int name_start; ++} Scanned_Entry; ++ ++static Eina_Hash *already_scanned_path = NULL; ++ ++static void ++cache_theme_change_verify(Efreet_Cache_Icon_Theme *theme) ++{ ++ Eina_Bool changed = EINA_FALSE; ++ Eina_List *l; ++ Efreet_Icon_Theme_Directory *d; ++ char buf[PATH_MAX], *tdir, *sep; ++ ++ tdir = strdup(theme->path); ++ sep = strrchr(tdir, '/'); ++ if (sep) *sep = 0; ++ EINA_LIST_FOREACH(theme->theme.directories, l, d) ++ { ++ snprintf(buf, sizeof(buf), "%s/%s", tdir, d->name); ++ if (cache_directory_modified(theme->dirs, buf)) ++ { ++ changed = EINA_TRUE; ++ } ++ } ++ free(tdir); ++ if (changed) theme->changed = changed; ++} ++ + static Eina_Bool + cache_scan_path_dir(Efreet_Icon_Theme *theme, + const char *path, +@@ -232,29 +261,63 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, + Eina_Iterator *it; + char buf[PATH_MAX]; + Eina_File_Direct_Info *entry; ++ Eina_List *dirs = NULL; ++ Eina_List *l; ++ char *ext; ++ Scanned_Entry *scentry; + + snprintf(buf, sizeof(buf), "%s/%s", path, dir->name); ++ // we wont ever free this - no point ++ if (!already_scanned_path) ++ already_scanned_path = eina_hash_string_superfast_new(NULL); ++ dirs = eina_hash_find(already_scanned_path, buf); ++ if ((intptr_t)dirs == (intptr_t)(-1L)) return EINA_TRUE; ++ else if (!dirs) ++ { ++ it = eina_file_stat_ls(buf); ++ if (!it) ++ { ++ eina_hash_add(already_scanned_path, buf, (void *)(intptr_t)(-1L)); ++ return EINA_TRUE; ++ } ++ ++ EINA_ITERATOR_FOREACH(it, entry) ++ { ++ if (entry->type == EINA_FILE_DIR) continue; ++ ext = strrchr(entry->path + entry->name_start, '.'); ++ if (!ext || !cache_extension_lookup(ext)) continue; ++ scentry = malloc(sizeof(Scanned_Entry)); ++ if (!scentry) ++ { ++ ERR("Out of memory"); ++ exit(1); ++ } ++ scentry->name_start = entry->name_start; ++ scentry->path = strdup(entry->path); ++ if (!scentry->path) ++ { ++ ERR("Out of memory"); ++ exit(1); ++ } ++ dirs = eina_list_append(dirs, scentry); ++ } ++ eina_iterator_free(it); ++ if (dirs) ++ eina_hash_add(already_scanned_path, buf, dirs); ++ else ++ eina_hash_add(already_scanned_path, buf, (void *)(intptr_t)(-1L)); ++ } + +- it = eina_file_stat_ls(buf); +- if (!it) return EINA_TRUE; +- +- EINA_ITERATOR_FOREACH(it, entry) ++ EINA_LIST_FOREACH(dirs, l, scentry) + { + Efreet_Cache_Icon *icon; + char *name; +- char *ext; + const char **tmp; + unsigned int i; + +- if (entry->type == EINA_FILE_DIR) +- continue; +- +- ext = strrchr(entry->path + entry->name_start, '.'); +- if (!ext || !cache_extension_lookup(ext)) +- continue; +- ++ ext = strrchr(scentry->path + scentry->name_start, '.'); + /* icon with known extension */ +- name = entry->path + entry->name_start; ++ name = scentry->path + scentry->name_start; + *ext = '\0'; + + icon = eina_hash_find(icons, name); +@@ -284,7 +347,7 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, + + /* check if the path already exist */ + for (j = 0; j < icon->icons[i]->paths_count; ++j) +- if (!strcmp(icon->icons[i]->paths[j], entry->path)) ++ if (!strcmp(icon->icons[i]->paths[j], scentry->path)) + break; + + if (j != icon->icons[i]->paths_count) +@@ -348,12 +411,9 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, + exit(1); + } + icon->icons[i]->paths = tmp; +- icon->icons[i]->paths[icon->icons[i]->paths_count] = eina_stringshare_add(entry->path); ++ icon->icons[i]->paths[icon->icons[i]->paths_count] = eina_stringshare_add(scentry->path); + eina_array_push(strs, icon->icons[i]->paths[icon->icons[i]->paths_count++]); + } +- +- eina_iterator_free(it); +- + return EINA_TRUE; + } + +@@ -364,7 +424,9 @@ cache_scan_path(Efreet_Icon_Theme *theme, Eina_Hash *icons, const char *path) + Efreet_Icon_Theme_Directory *dir; + + EINA_LIST_FOREACH(theme->directories, l, dir) ++ { + if (!cache_scan_path_dir(theme, path, dir, icons)) return EINA_FALSE; ++ } + + return EINA_TRUE; + } +@@ -511,13 +573,13 @@ icon_theme_index_read(Efreet_Cache_Icon_Theme *theme, const char *path) + Efreet_Ini *ini; + Efreet_Icon_Theme_Directory *dir; + const char *tmp; +- long long time; ++ Efreet_Cache_Check check; + + if (!theme || !path) return EINA_FALSE; + +- time = ecore_file_mod_time(path); +- if (!time) return EINA_FALSE; +- if (theme->path && !strcmp(theme->path, path) && theme->last_cache_check >= time) ++ if (!efreet_file_cache_fill(path, &check)) return EINA_FALSE; ++ if (theme->path && !strcmp(theme->path, path) && ++ efreet_file_cache_check(&check, &(theme->check))) + { + /* no change */ + theme->valid = 1; +@@ -528,8 +590,7 @@ icon_theme_index_read(Efreet_Cache_Icon_Theme *theme, const char *path) + theme->path = eina_stringshare_add(path); + eina_array_push(strs, theme->path); + } +- if (time > theme->last_cache_check) +- theme->last_cache_check = time; ++ theme->check = check; + theme->changed = 1; + + ini = efreet_ini_new(path); +@@ -644,10 +705,10 @@ cache_theme_scan(const char *dir) + Efreet_Cache_Icon_Theme *theme; + const char *name; + const char *path; +- long long time; ++ Efreet_Cache_Check check; ++ Efreet_Cache_Directory *d; + +- time = ecore_file_mod_time(entry->path); +- if (!time) continue; ++ if (!efreet_file_cache_fill(entry->path, &check)) continue; + + if ((entry->type != EINA_FILE_DIR) && + (entry->type != EINA_FILE_LNK)) +@@ -669,10 +730,26 @@ cache_theme_scan(const char *dir) + (void *)theme->theme.name.internal, theme); + theme->changed = 1; + } +- if (time > theme->last_cache_check) +- { +- theme->last_cache_check = time; ++ ++ d = NULL; ++ if (theme->dirs) ++ d = eina_hash_find(theme->dirs, entry->path); ++ if (!d) ++ { ++ if (!theme->dirs) ++ theme->dirs = eina_hash_string_superfast_new(NULL); + theme->changed = 1; ++ d = NEW(Efreet_Cache_Directory, 1); ++ d->check = check; ++ eina_hash_add(theme->dirs, entry->path, d); ++ } ++ else ++ { ++ if (!efreet_file_cache_check(&check, &(d->check))) ++ { ++ d->check = check; ++ theme->changed = 1; ++ } + } + + /* TODO: We need to handle change in order of included paths */ +@@ -732,8 +809,7 @@ icon_theme_free(Efreet_Cache_Icon_Theme *theme) + + eina_list_free(theme->theme.paths); + eina_list_free(theme->theme.inherits); +- EINA_LIST_FREE(theme->theme.directories, data) +- free(data); ++ EINA_LIST_FREE(theme->theme.directories, data) free(data); + if (theme->dirs) efreet_hash_free(theme->dirs, free); + free(theme); + } +@@ -926,7 +1002,7 @@ main(int argc, char **argv) + if (!theme->theme.name.name) continue; + #endif + INF("scan theme %s", theme->theme.name.name); +- ++ cache_theme_change_verify(theme); + theme->changed = check_changed(theme); + if (flush) + theme->changed = EINA_TRUE; +@@ -981,18 +1057,18 @@ main(int argc, char **argv) + + icons_it = eina_hash_iterator_tuple_new(icons); + EINA_ITERATOR_FOREACH(icons_it, tuple) +- eet_data_write(icon_ef, icon_edd, tuple->key, tuple->data, 1); ++ eet_data_write(icon_ef, icon_edd, tuple->key, tuple->data, EET_COMPRESSION_SUPERFAST); + eina_iterator_free(icons_it); + +- INF("theme change: %s %lld", theme->theme.name.internal, theme->last_cache_check); +- eet_data_write(theme_ef, theme_edd, theme->theme.name.internal, theme, 1); ++ INF("theme change: %s %lld", theme->theme.name.internal, theme->check.mtime); ++ eet_data_write(theme_ef, theme_edd, theme->theme.name.internal, theme, EET_COMPRESSION_SUPERFAST); + } + eina_hash_free(themes); + eina_hash_free(icons); + changed = EINA_TRUE; + } + +- eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1); ++ eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, EET_COMPRESSION_SUPERFAST); + eet_close(icon_ef); + efreet_setowner(efreet_icon_cache_file(theme->theme.name.internal)); + free(icon_version); +@@ -1064,17 +1140,17 @@ main(int argc, char **argv) + + icons_it = eina_hash_iterator_tuple_new(icons); + EINA_ITERATOR_FOREACH(icons_it, tuple) +- eet_data_write(icon_ef, fallback_edd, tuple->key, tuple->data, 1); ++ eet_data_write(icon_ef, fallback_edd, tuple->key, tuple->data, EET_COMPRESSION_SUPERFAST); + eina_iterator_free(icons_it); + } + eina_hash_free(icons); + +- eet_data_write(theme_ef, theme_edd, EFREET_CACHE_ICON_FALLBACK, theme, 1); ++ eet_data_write(theme_ef, theme_edd, EFREET_CACHE_ICON_FALLBACK, theme, EET_COMPRESSION_SUPERFAST); + } + + icon_theme_free(theme); + +- eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1); ++ eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, EET_COMPRESSION_SUPERFAST); + eet_close(icon_ef); + efreet_setowner(efreet_icon_cache_file(EFREET_CACHE_ICON_FALLBACK)); + free(icon_version); +@@ -1082,7 +1158,7 @@ main(int argc, char **argv) + eina_hash_free(icon_themes); + + /* save data */ +- eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, 1); ++ eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, EET_COMPRESSION_SUPERFAST); + + eet_close(theme_ef); + theme_ef = NULL; +diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c +index f859c630f0..2b5d0c9f5f 100644 +--- a/src/lib/efreet/efreet_cache.c ++++ b/src/lib/efreet/efreet_cache.c +@@ -1,3 +1,4 @@ ++ + #ifdef HAVE_CONFIG_H + # include + #endif +@@ -536,6 +537,137 @@ efreet_desktop_util_cache_file(void) + /* + * Needs EAPI because of helper binaries + */ ++#define SHSH(n, v) ((((v) << (n)) & 0xffffffff) | ((v) >> (32 - (n)))) ++ ++static inline int ++int_to_bigendian(int in) ++{ ++ static const unsigned char test[4] = { 0x11, 0x22, 0x33, 0x44 }; ++ static const unsigned int *test_i = (const unsigned int *)test; ++ if (test_i[0] == 0x44332211) return eina_swap32(in); ++ return in; ++} ++ ++static void ++sha1(unsigned char *data, int size, unsigned char *dst) ++{ ++ unsigned int digest[5], word[80], wa, wb, wc, wd, we, t; ++ unsigned char buf[64], *d; ++ int idx, left, i; ++ const unsigned int magic[4] = ++ { 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 }; ++ ++ idx = 0; ++ digest[0] = 0x67452301; digest[1] = 0xefcdab89; digest[2] = 0x98badcfe; ++ digest[3] = 0x10325476; digest[4] = 0xc3d2e1f0; ++ ++ memset(buf, 0, sizeof(buf)); ++ for (left = size, d = data; left > 0; left--, d++) ++ { ++ if ((idx == 0) && (left < 64)) ++ { ++ memset(buf, 0, 60); ++ buf[60] = (size >> 24) & 0xff; ++ buf[61] = (size >> 16) & 0xff; ++ buf[62] = (size >> 8) & 0xff; ++ buf[63] = (size) & 0xff; ++ } ++ buf[idx] = *d; ++ idx++; ++ if ((idx == 64) || (left == 1)) ++ { ++ if ((left == 1) && (idx < 64)) buf[idx] = 0x80; ++ for (i = 0; i < 16; i++) ++ { ++ word[i] = (unsigned int)buf[(i * 4) ] << 24; ++ word[i] |= (unsigned int)buf[(i * 4) + 1] << 16; ++ word[i] |= (unsigned int)buf[(i * 4) + 2] << 8; ++ word[i] |= (unsigned int)buf[(i * 4) + 3]; ++ } ++ for (i = 16; i < 80; i++) ++ word[i] = SHSH(1, ++ word[i - 3 ] ^ word[i - 8 ] ^ ++ word[i - 14] ^ word[i - 16]); ++ wa = digest[0]; wb = digest[1]; wc = digest[2]; ++ wd = digest[3]; we = digest[4]; ++ for (i = 0; i < 80; i++) ++ { ++ if (i < 20) ++ t = SHSH(5, wa) + ((wb & wc) | ((~wb) & wd)) + ++ we + word[i] + magic[0]; ++ else if (i < 40) ++ t = SHSH(5, wa) + (wb ^ wc ^ wd) + ++ we + word[i] + magic[1]; ++ else if (i < 60) ++ t = SHSH(5, wa) + ((wb & wc) | (wb & wd) | (wc & wd)) + ++ we + word[i] + magic[2]; ++ else if (i < 80) ++ t = SHSH(5, wa) + (wb ^ wc ^ wd) + ++ we + word[i] + magic[3]; ++ we = wd; ++ wd = wc; ++ wc = SHSH(30, wb); ++ wb = wa; ++ wa = t; ++ } ++ digest[0] += wa; digest[1] += wb; digest[2] += wc; ++ digest[3] += wd; digest[4] += we; ++ idx = 0; ++ } ++ } ++ t = int_to_bigendian(digest[0]); digest[0] = t; ++ t = int_to_bigendian(digest[1]); digest[1] = t; ++ t = int_to_bigendian(digest[2]); digest[2] = t; ++ t = int_to_bigendian(digest[3]); digest[3] = t; ++ t = int_to_bigendian(digest[4]); digest[4] = t; ++ memcpy(dst, digest, 5 * 4); ++} ++ ++EAPI Eina_Bool ++efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check) ++{ ++ struct stat st; ++ ssize_t size = 0; ++ char link[PATH_MAX]; ++ ++ if (lstat(file, &st) != 0) return EINA_FALSE; ++ if (S_ISLNK(st.st_mode)) ++ { ++ size = readlink(file, link, sizeof(link)); ++ if ((size > 0) && ((size_t)size >= sizeof(link))) return EINA_FALSE; ++ if (stat(file, &st) != 0) return EINA_FALSE; ++ } ++ ++ memset(check, 0, sizeof(Efreet_Cache_Check)); ++ if (size > 0) sha1((unsigned char *)link, size, check->link_sha1); ++ else memset(check->link_sha1, 0, sizeof(check->link_sha1)); ++ check->uid = st.st_uid; ++ check->gid = st.st_gid; ++ check->size = st.st_size; ++ check->blocks = st.st_blocks; ++ check->mtime = st.st_mtime; ++ check->chtime = st.st_ctime; ++ check->mode = st.st_mode; ++ return EINA_TRUE; ++} ++ ++EAPI Eina_Bool // true if matches ++efreet_file_cache_check(const Efreet_Cache_Check *check1, const Efreet_Cache_Check *check2) ++{ ++ if ((check1->mtime != check2->mtime ) || ++ (check1->size != check2->size ) || ++ (check1->chtime != check2->chtime ) || ++ (check1->blocks != check2->blocks) || ++ (check1->mode != check2->mode ) || ++ (check1->uid != check2->uid ) || ++ (check1->gid != check2->gid ) || ++ (memcmp(check1->link_sha1, check2->link_sha1, 20) != 0)) ++ { ++ return EINA_FALSE; ++ } ++ return EINA_TRUE; // matches ++} ++ + EAPI Eet_Data_Descriptor * + efreet_version_edd(void) + { +@@ -691,8 +823,22 @@ efreet_icon_directory_edd(void) + directory_edd = eet_data_descriptor_file_new(&eddc); + if (!directory_edd) return NULL; + +- EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, +- "modified_time", modified_time, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.uid", check.uid, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.gid", check.gid, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.size", check.size, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.blocks", check.blocks, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.mtime", check.mtime, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.chtime", check.chtime, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(directory_edd, Efreet_Cache_Directory, ++ "check.mode", check.mode, EET_T_INT); ++ EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(directory_edd, Efreet_Cache_Directory, ++ "check.link_sha1", check.link_sha1, EET_T_CHAR); + + return directory_edd; + } +@@ -790,7 +936,21 @@ efreet_icon_theme_edd(Eina_Bool cache) + if (cache) + { + EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, +- "last_cache_check", last_cache_check, EET_T_LONG_LONG); ++ "check.uid", check.uid, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.gid", check.gid, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.size", check.size, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.blocks", check.blocks, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.mtime", check.mtime, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.chtime", check.chtime, EET_T_LONG_LONG); ++ EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.mode", check.mode, EET_T_INT); ++ EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(icon_theme_edd, Efreet_Cache_Icon_Theme, ++ "check.link_sha1", check.link_sha1, EET_T_CHAR); + + EET_DATA_DESCRIPTOR_ADD_BASIC(icon_theme_edd, Efreet_Cache_Icon_Theme, + "path", path, EET_T_STRING); +diff --git a/src/lib/efreet/efreet_cache_private.h b/src/lib/efreet/efreet_cache_private.h +index 97dbd45a1e..1edbb3b5ff 100644 +--- a/src/lib/efreet/efreet_cache_private.h ++++ b/src/lib/efreet/efreet_cache_private.h +@@ -38,11 +38,20 @@ + # endif + #endif + ++typedef struct _Efreet_Cache_Check Efreet_Cache_Check; ++ ++typedef struct _Efreet_Cache_Icon_Theme Efreet_Cache_Icon_Theme; ++typedef struct _Efreet_Cache_Directory Efreet_Cache_Directory; ++typedef struct _Efreet_Cache_Desktop Efreet_Cache_Desktop; ++ + EAPI const char *efreet_desktop_util_cache_file(void); + EAPI const char *efreet_desktop_cache_file(void); + EAPI const char *efreet_icon_cache_file(const char *theme); + EAPI const char *efreet_icon_theme_cache_file(void); + ++EAPI Eina_Bool efreet_file_cache_fill(const char *file, Efreet_Cache_Check *check); ++EAPI Eina_Bool efreet_file_cache_check(const Efreet_Cache_Check *check1, const Efreet_Cache_Check *check2); ++ + EAPI Eet_Data_Descriptor *efreet_version_edd(void); + EAPI Eet_Data_Descriptor *efreet_desktop_edd(void); + EAPI Eet_Data_Descriptor *efreet_hash_array_string_edd(void); +@@ -52,15 +61,23 @@ EAPI Eet_Data_Descriptor *efreet_icon_theme_edd(Eina_Bool cache); + EAPI Eet_Data_Descriptor *efreet_icon_edd(void); + EAPI Eet_Data_Descriptor *efreet_icon_fallback_edd(void); + +-typedef struct _Efreet_Cache_Icon_Theme Efreet_Cache_Icon_Theme; +-typedef struct _Efreet_Cache_Directory Efreet_Cache_Directory; +-typedef struct _Efreet_Cache_Desktop Efreet_Cache_Desktop; ++struct _Efreet_Cache_Check ++{ ++ unsigned long long uid; ++ unsigned long long gid; ++ unsigned long long size; ++ unsigned long long blocks; ++ unsigned long long mtime; ++ unsigned long long chtime; ++ unsigned int mode; ++ unsigned char link_sha1[20]; ++}; + + struct _Efreet_Cache_Icon_Theme + { + Efreet_Icon_Theme theme; + +- long long last_cache_check; /**< Last time the cache was checked */ ++ Efreet_Cache_Check check; /**< relevant stat info from last check */ + + Eina_Hash *dirs; /**< All possible icon paths for this theme */ + +@@ -73,13 +90,14 @@ struct _Efreet_Cache_Icon_Theme + + struct _Efreet_Cache_Directory + { +- long long modified_time; ++ Efreet_Cache_Check check; /**< relevant stat info from last check */ + }; + + struct _Efreet_Cache_Desktop + { + Efreet_Desktop desktop; + ++ Efreet_Cache_Check check; /**< relevant stat info from last check */ + double check_time; /**< Last time we check for disk modification */ + }; diff --git a/pkgs/desktops/enlightenment/efl/default.nix b/pkgs/desktops/enlightenment/efl/default.nix new file mode 100644 index 0000000000000..0fa5edc934c48 --- /dev/null +++ b/pkgs/desktops/enlightenment/efl/default.nix @@ -0,0 +1,205 @@ +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, SDL2 +, alsaLib +, bullet +, check +, curl +, dbus +, doxygen +, expat +, fontconfig +, freetype +, fribidi +, ghostscript +, giflib +, glib +, gst_all_1 +, gtk3 +, harfbuzz +, hicolor-icon-theme +, ibus +, jbig2dec +, libGL +, libdrm +, libinput +, libjpeg +, libpng +, libpulseaudio +, libraw +, librsvg +, libsndfile +, libspectre +, libtiff +, libwebp +, libxkbcommon +, luajit +, lz4 +, mesa +, mint-x-icons +, openjpeg +, openssl +, poppler +, python3Packages +, systemd +, udev +, utillinux +, writeText +, xorg +, zlib +}: + +stdenv.mkDerivation rec { + pname = "efl"; + version = "1.24.3"; + + src = fetchurl { + url = "http://download.enlightenment.org/rel/libs/${pname}/${pname}-${version}.tar.xz"; + sha256 = "de95c6e673c170c1e21382918b122417c091c643e7dcaced89aa785529625c2a"; + }; + + nativeBuildInputs = [ + meson + ninja + gtk3 + pkgconfig + check + ]; + + buildInputs = [ + fontconfig + freetype + giflib + glib + gst_all_1.gst-libav + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gstreamer + ibus + libGL + libpng + libpulseaudio + libsndfile + libtiff + lz4 + mesa + openssl + systemd + udev + xorg.libX11 + xorg.libXcursor + xorg.xorgproto + zlib + # still missing parent icon themes: RAVE-X, Faenza + ]; + + propagatedBuildInputs = [ + SDL2 + alsaLib + bullet + curl + dbus + dbus + doxygen + expat + fribidi + ghostscript + harfbuzz + hicolor-icon-theme # for the icon theme + jbig2dec + libdrm + libinput + libjpeg + libraw + librsvg + libspectre + libwebp + libxkbcommon + luajit + mint-x-icons # Mint-X is a parent icon theme of Enlightenment-X + openjpeg + poppler + utillinux + xorg.libXScrnSaver + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXinerama + xorg.libXrandr + xorg.libXrender + xorg.libXtst + xorg.libxcb + ]; + + dontDropIconThemeCache = true; + + mesonFlags = [ + "--buildtype=release" + "-D build-tests=false" # disable build tests, which are not working + "-D drm=true" + "-D ecore-imf-loaders-disabler=ibus,scim" # ibus is disalbed by default, scim is not availabe in nixpkgs + "-D embedded-lz4=false" + "-D fb=true" + "-D network-backend=connman" + "-D sdl=true" + ]; + + patches = [ + ./efl-elua.patch + ./0002-efreet-more-stat-info-changes.patch + ]; + + postPatch = '' + patchShebangs src/lib/elementary/config_embed + + # fix destination of systemd unit and dbus service + substituteInPlace systemd-services/meson.build --replace "sys_dep.get_pkgconfig_variable('systemduserunitdir')" "'$out/systemd/user'" + substituteInPlace dbus-services/meson.build --replace "dep.get_pkgconfig_variable('session_bus_services_dir')" "'$out/share/dbus-1/services'" + ''; + + # bin/edje_cc creates $HOME/.run, which would break build of reverse dependencies. + setupHook = writeText "setupHook.sh" '' + export HOME="$TEMPDIR" + ''; + + preConfigure = '' + # allow ecore_con to find libcurl.so, which is a runtime dependency (it is dlopened) + export LD_LIBRARY_PATH="${curl.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + + source "$setupHook" + ''; + + NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3 + + postInstall = '' + # fix use of $out variable + substituteInPlace "$out/share/elua/core/util.lua" --replace '$out' "$out" + + # add all module include dirs to the Cflags field in efl.pc + modules=$(for i in "$out/include/"*/; do printf ' -I''${includedir}/'`basename $i`; done) + substituteInPlace "$out/lib/pkgconfig/efl.pc" \ + --replace 'Cflags: -I''${includedir}/efl-1' \ + 'Cflags: -I''${includedir}/eina-1/eina'"$modules" + + # build icon cache + gtk-update-icon-cache "$out"/share/icons/Enlightenment-X + ''; + + postFixup = '' + # EFL applications depend on libcurl, which is linked at runtime by hand in code (it is dlopened) + patchelf --add-needed ${curl.out}/lib/libcurl.so $out/lib/libecore_con.so + ''; + + meta = { + description = "Enlightenment foundation libraries"; + homepage = "https://enlightenment.org/"; + license = stdenv.lib.licenses.lgpl3; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx romildo ]; + }; +} diff --git a/pkgs/desktops/enlightenment/efl/efl-elua.patch b/pkgs/desktops/enlightenment/efl/efl-elua.patch new file mode 100644 index 0000000000000..96c42b3ff3ca1 --- /dev/null +++ b/pkgs/desktops/enlightenment/efl/efl-elua.patch @@ -0,0 +1,14 @@ +--- ./src/scripts/elua/core/util.lua.old 2015-05-17 11:59:57.307743243 +0200 ++++ ./src/scripts/elua/core/util.lua 2015-05-17 12:39:11.906797377 +0200 +@@ -159,7 +159,10 @@ + local ev = os.getenv("ELUA_" .. libname:upper() .. "_LIBRARY_PATH") + local succ, v = load_lib(libname, ev) + if not succ then +- error(v, 2) ++ succ, v = load_lib(libname, "$out/lib") ++ if not succ then ++ error(v, 2) ++ end + end + lib = v + loaded_libs[libname] = lib -- cgit 1.4.1 From f9d16d59f6351bcc24d2791a325798471f2b3d2e Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Fri, 31 Jul 2020 09:25:54 -0300 Subject: enlightenment.enlightenment: move to pkgs/desktops/enlightenment/enlightenment/ --- .../0001-wrapped-setuid-executables.patch | 114 --------------------- .../enlightenment/0003-setuid-missing-path.patch | 25 ----- pkgs/desktops/enlightenment/default.nix | 2 +- pkgs/desktops/enlightenment/enlightenment.nix | 76 -------------- .../0001-wrapped-setuid-executables.patch | 114 +++++++++++++++++++++ .../enlightenment/0003-setuid-missing-path.patch | 25 +++++ .../enlightenment/enlightenment/default.nix | 76 ++++++++++++++ 7 files changed, 216 insertions(+), 216 deletions(-) delete mode 100644 pkgs/desktops/enlightenment/0001-wrapped-setuid-executables.patch delete mode 100644 pkgs/desktops/enlightenment/0003-setuid-missing-path.patch delete mode 100644 pkgs/desktops/enlightenment/enlightenment.nix create mode 100644 pkgs/desktops/enlightenment/enlightenment/0001-wrapped-setuid-executables.patch create mode 100644 pkgs/desktops/enlightenment/enlightenment/0003-setuid-missing-path.patch create mode 100644 pkgs/desktops/enlightenment/enlightenment/default.nix (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/enlightenment/0001-wrapped-setuid-executables.patch b/pkgs/desktops/enlightenment/0001-wrapped-setuid-executables.patch deleted file mode 100644 index 55a3501ef8b98..0000000000000 --- a/pkgs/desktops/enlightenment/0001-wrapped-setuid-executables.patch +++ /dev/null @@ -1,114 +0,0 @@ -From a1e54ae0097a3b6a0dabf4639fe8bc594c4f602d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= -Date: Thu, 14 May 2020 16:36:34 -0300 -Subject: [PATCH] wrapped setuid executables - -Installing programs with root ownership and setuid/setgid permissions -in /nix/store is not allowed. They should be wrapped in the -enlightenment service module, and the wrapped ones should be used -instead. ---- - meson/meson_inst.sh | 4 ++-- - src/bin/e_auth.c | 6 ++---- - src/bin/e_fm/e_fm_main_eeze.c | 6 +++--- - src/bin/e_start_main.c | 2 +- - src/bin/e_system.c | 2 +- - 5 files changed, 9 insertions(+), 11 deletions(-) - -diff --git a/meson/meson_inst.sh b/meson/meson_inst.sh -index 321143e40..cd2399306 100755 ---- a/meson/meson_inst.sh -+++ b/meson/meson_inst.sh -@@ -1,6 +1,6 @@ - #!/bin/sh - - for x in "$@" ; do -- chown root "$DESTDIR/$x" -- chmod a=rx,u+xs "$DESTDIR/$x" -+ echo TODO: chown root "$DESTDIR/$x" -+ echo TODO: chmod a=rx,u+xs "$DESTDIR/$x" - done -diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c -index 8b0aa6641..63c68c4bc 100644 ---- a/src/bin/e_auth.c -+++ b/src/bin/e_auth.c -@@ -12,8 +12,7 @@ e_auth_begin(char *passwd) - if (pwlen == 0) goto out; - - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_ckpasswd pw", -- e_prefix_lib_get()); -+ "/run/wrappers/bin/enlightenment_ckpasswd pw"); - exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); - if (!exe) goto out; - if (ecore_exe_send(exe, passwd, pwlen) != EINA_TRUE) goto out; -@@ -47,8 +46,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid) - if (pwlen == 0) goto out; - - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_ckpasswd pk", -- e_prefix_lib_get()); -+ "/run/wrappers/bin/enlightenment_ckpasswd pk"); - exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); - if (!exe) goto out; - snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd); -diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c -index 9b10b3117..0f0aa5b53 100644 ---- a/src/bin/e_fm/e_fm_main_eeze.c -+++ b/src/bin/e_fm/e_fm_main_eeze.c -@@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v) - { - char buf[PATH_MAX]; - -- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); -+ snprintf(buf, sizeof(buf), "/run/wrappers/bin/enlightenment_sys"); - eeze_disk_mount_wrapper_set(v->disk, buf); - } - v->guard = ecore_timer_loop_add(E_FM_EJECT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_eject_timeout, v); -@@ -512,7 +512,7 @@ _e_fm_main_eeze_volume_unmount(E_Volume *v) - { - char buf[PATH_MAX]; - -- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); -+ snprintf(buf, sizeof(buf), "/run/wrappers/bin/enlightenment_sys"); - eeze_disk_mount_wrapper_set(v->disk, buf); - } - v->guard = ecore_timer_loop_add(E_FM_UNMOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_unmount_timeout, v); -@@ -548,7 +548,7 @@ _e_fm_main_eeze_volume_mount(E_Volume *v) - { - char buf2[PATH_MAX]; - -- snprintf(buf2, sizeof(buf2), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); -+ snprintf(buf2, sizeof(buf2), "/run/wrappers/bin/enlightenment_sys"); - eeze_disk_mount_wrapper_set(v->disk, buf2); - } - v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); -diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c -index 8534a7a8e..f0f0061a4 100644 ---- a/src/bin/e_start_main.c -+++ b/src/bin/e_start_main.c -@@ -709,7 +709,7 @@ main(int argc, char **argv) - "E_ALERT_FONT_DIR=%s/data/fonts", eina_prefix_data_get(pfx)); - putenv(buf2); - snprintf(buf3, sizeof(buf3), -- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", eina_prefix_lib_get(pfx)); -+ "E_ALERT_SYSTEM_BIN=/run/wrappers/bin/enlightenment_system"); - putenv(buf3); - - if ((valgrind_mode || valgrind_tool) && -diff --git a/src/bin/e_system.c b/src/bin/e_system.c -index 1e7aabb64..5084933a1 100644 ---- a/src/bin/e_system.c -+++ b/src/bin/e_system.c -@@ -132,7 +132,7 @@ _system_spawn(void) - else _respawn_count = 0; - if (_respawn_count > 5) return; - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_system", e_prefix_lib_get()); -+ "/run/wrappers/bin/enlightenment_system"); - _system_exe = ecore_exe_pipe_run - (buf, ECORE_EXE_NOT_LEADER | ECORE_EXE_TERM_WITH_PARENT | - ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, NULL); --- -2.26.2 - diff --git a/pkgs/desktops/enlightenment/0003-setuid-missing-path.patch b/pkgs/desktops/enlightenment/0003-setuid-missing-path.patch deleted file mode 100644 index 5c32ed9b0d632..0000000000000 --- a/pkgs/desktops/enlightenment/0003-setuid-missing-path.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b7ef2a0d3f31db55a12b2b8c2e1c60ba62b971c8 Mon Sep 17 00:00:00 2001 -From: Matt Bagnara -Date: Wed, 1 Jul 2020 15:30:40 -0500 -Subject: [PATCH] add nixos path - ---- - src/bin/e_util_suid.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/bin/e_util_suid.h b/src/bin/e_util_suid.h -index b01ff792b..88c2a0f17 100644 ---- a/src/bin/e_util_suid.h -+++ b/src/bin/e_util_suid.h -@@ -246,7 +246,7 @@ e_setuid_setup(uid_t *caller_uid, gid_t *caller_gid, char **caller_user, char ** - # endif - #endif - // pass 3 - set path and ifs to minimal defaults -- putenv("PATH=/bin:/usr/bin:/sbin:/usr/sbin"); -+ putenv("PATH=/bin:/usr/bin:/sbin:/usr/sbin:/run/current-system/sw/bin"); - putenv("IFS= \t\n"); - return 0; - } --- -2.27.0 - diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix index bdb56e9172d1a..2dd19ce146b28 100644 --- a/pkgs/desktops/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/default.nix @@ -4,7 +4,7 @@ efl = callPackage ./efl { }; #### WINDOW MANAGER - enlightenment = callPackage ./enlightenment.nix { }; + enlightenment = callPackage ./enlightenment { }; #### APPLICATIONS econnman = callPackage ./econnman.nix { }; diff --git a/pkgs/desktops/enlightenment/enlightenment.nix b/pkgs/desktops/enlightenment/enlightenment.nix deleted file mode 100644 index 90a15a1d52351..0000000000000 --- a/pkgs/desktops/enlightenment/enlightenment.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ 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 ]; - }; -} diff --git a/pkgs/desktops/enlightenment/enlightenment/0001-wrapped-setuid-executables.patch b/pkgs/desktops/enlightenment/enlightenment/0001-wrapped-setuid-executables.patch new file mode 100644 index 0000000000000..55a3501ef8b98 --- /dev/null +++ b/pkgs/desktops/enlightenment/enlightenment/0001-wrapped-setuid-executables.patch @@ -0,0 +1,114 @@ +From a1e54ae0097a3b6a0dabf4639fe8bc594c4f602d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= +Date: Thu, 14 May 2020 16:36:34 -0300 +Subject: [PATCH] wrapped setuid executables + +Installing programs with root ownership and setuid/setgid permissions +in /nix/store is not allowed. They should be wrapped in the +enlightenment service module, and the wrapped ones should be used +instead. +--- + meson/meson_inst.sh | 4 ++-- + src/bin/e_auth.c | 6 ++---- + src/bin/e_fm/e_fm_main_eeze.c | 6 +++--- + src/bin/e_start_main.c | 2 +- + src/bin/e_system.c | 2 +- + 5 files changed, 9 insertions(+), 11 deletions(-) + +diff --git a/meson/meson_inst.sh b/meson/meson_inst.sh +index 321143e40..cd2399306 100755 +--- a/meson/meson_inst.sh ++++ b/meson/meson_inst.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + for x in "$@" ; do +- chown root "$DESTDIR/$x" +- chmod a=rx,u+xs "$DESTDIR/$x" ++ echo TODO: chown root "$DESTDIR/$x" ++ echo TODO: chmod a=rx,u+xs "$DESTDIR/$x" + done +diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c +index 8b0aa6641..63c68c4bc 100644 +--- a/src/bin/e_auth.c ++++ b/src/bin/e_auth.c +@@ -12,8 +12,7 @@ e_auth_begin(char *passwd) + if (pwlen == 0) goto out; + + snprintf(buf, sizeof(buf), +- "%s/enlightenment/utils/enlightenment_ckpasswd pw", +- e_prefix_lib_get()); ++ "/run/wrappers/bin/enlightenment_ckpasswd pw"); + exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); + if (!exe) goto out; + if (ecore_exe_send(exe, passwd, pwlen) != EINA_TRUE) goto out; +@@ -47,8 +46,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid) + if (pwlen == 0) goto out; + + snprintf(buf, sizeof(buf), +- "%s/enlightenment/utils/enlightenment_ckpasswd pk", +- e_prefix_lib_get()); ++ "/run/wrappers/bin/enlightenment_ckpasswd pk"); + exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); + if (!exe) goto out; + snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd); +diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c +index 9b10b3117..0f0aa5b53 100644 +--- a/src/bin/e_fm/e_fm_main_eeze.c ++++ b/src/bin/e_fm/e_fm_main_eeze.c +@@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v) + { + char buf[PATH_MAX]; + +- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); ++ snprintf(buf, sizeof(buf), "/run/wrappers/bin/enlightenment_sys"); + eeze_disk_mount_wrapper_set(v->disk, buf); + } + v->guard = ecore_timer_loop_add(E_FM_EJECT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_eject_timeout, v); +@@ -512,7 +512,7 @@ _e_fm_main_eeze_volume_unmount(E_Volume *v) + { + char buf[PATH_MAX]; + +- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); ++ snprintf(buf, sizeof(buf), "/run/wrappers/bin/enlightenment_sys"); + eeze_disk_mount_wrapper_set(v->disk, buf); + } + v->guard = ecore_timer_loop_add(E_FM_UNMOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_unmount_timeout, v); +@@ -548,7 +548,7 @@ _e_fm_main_eeze_volume_mount(E_Volume *v) + { + char buf2[PATH_MAX]; + +- snprintf(buf2, sizeof(buf2), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); ++ snprintf(buf2, sizeof(buf2), "/run/wrappers/bin/enlightenment_sys"); + eeze_disk_mount_wrapper_set(v->disk, buf2); + } + v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); +diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c +index 8534a7a8e..f0f0061a4 100644 +--- a/src/bin/e_start_main.c ++++ b/src/bin/e_start_main.c +@@ -709,7 +709,7 @@ main(int argc, char **argv) + "E_ALERT_FONT_DIR=%s/data/fonts", eina_prefix_data_get(pfx)); + putenv(buf2); + snprintf(buf3, sizeof(buf3), +- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", eina_prefix_lib_get(pfx)); ++ "E_ALERT_SYSTEM_BIN=/run/wrappers/bin/enlightenment_system"); + putenv(buf3); + + if ((valgrind_mode || valgrind_tool) && +diff --git a/src/bin/e_system.c b/src/bin/e_system.c +index 1e7aabb64..5084933a1 100644 +--- a/src/bin/e_system.c ++++ b/src/bin/e_system.c +@@ -132,7 +132,7 @@ _system_spawn(void) + else _respawn_count = 0; + if (_respawn_count > 5) return; + snprintf(buf, sizeof(buf), +- "%s/enlightenment/utils/enlightenment_system", e_prefix_lib_get()); ++ "/run/wrappers/bin/enlightenment_system"); + _system_exe = ecore_exe_pipe_run + (buf, ECORE_EXE_NOT_LEADER | ECORE_EXE_TERM_WITH_PARENT | + ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, NULL); +-- +2.26.2 + diff --git a/pkgs/desktops/enlightenment/enlightenment/0003-setuid-missing-path.patch b/pkgs/desktops/enlightenment/enlightenment/0003-setuid-missing-path.patch new file mode 100644 index 0000000000000..5c32ed9b0d632 --- /dev/null +++ b/pkgs/desktops/enlightenment/enlightenment/0003-setuid-missing-path.patch @@ -0,0 +1,25 @@ +From b7ef2a0d3f31db55a12b2b8c2e1c60ba62b971c8 Mon Sep 17 00:00:00 2001 +From: Matt Bagnara +Date: Wed, 1 Jul 2020 15:30:40 -0500 +Subject: [PATCH] add nixos path + +--- + src/bin/e_util_suid.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bin/e_util_suid.h b/src/bin/e_util_suid.h +index b01ff792b..88c2a0f17 100644 +--- a/src/bin/e_util_suid.h ++++ b/src/bin/e_util_suid.h +@@ -246,7 +246,7 @@ e_setuid_setup(uid_t *caller_uid, gid_t *caller_gid, char **caller_user, char ** + # endif + #endif + // pass 3 - set path and ifs to minimal defaults +- putenv("PATH=/bin:/usr/bin:/sbin:/usr/sbin"); ++ putenv("PATH=/bin:/usr/bin:/sbin:/usr/sbin:/run/current-system/sw/bin"); + putenv("IFS= \t\n"); + return 0; + } +-- +2.27.0 + diff --git a/pkgs/desktops/enlightenment/enlightenment/default.nix b/pkgs/desktops/enlightenment/enlightenment/default.nix new file mode 100644 index 0000000000000..90a15a1d52351 --- /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 ]; + }; +} -- cgit 1.4.1 From 0f2bbb850dfc89018e4c4d51d2aea1efea268844 Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Fri, 31 Jul 2020 09:32:01 -0300 Subject: enlightenment.econnman: move to pkgs/desktops/enlightenment/econnman/ --- pkgs/desktops/enlightenment/default.nix | 2 +- pkgs/desktops/enlightenment/econnman.nix | 29 ------------------------ pkgs/desktops/enlightenment/econnman/default.nix | 29 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 pkgs/desktops/enlightenment/econnman.nix create mode 100644 pkgs/desktops/enlightenment/econnman/default.nix (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix index 2dd19ce146b28..36b53c3c9a094 100644 --- a/pkgs/desktops/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/default.nix @@ -7,7 +7,7 @@ enlightenment = callPackage ./enlightenment { }; #### APPLICATIONS - econnman = callPackage ./econnman.nix { }; + econnman = callPackage ./econnman { }; terminology = callPackage ./terminology.nix { }; rage = callPackage ./rage.nix { }; ephoto = callPackage ./ephoto.nix { }; diff --git a/pkgs/desktops/enlightenment/econnman.nix b/pkgs/desktops/enlightenment/econnman.nix deleted file mode 100644 index 1979b4518a708..0000000000000 --- a/pkgs/desktops/enlightenment/econnman.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, efl, python3Packages, dbus, makeWrapper }: - -stdenv.mkDerivation rec { - pname = "econnman"; - version = "1.1"; - - src = fetchurl { - url = "http://download.enlightenment.org/rel/apps/econnman/${pname}-${version}.tar.gz"; - sha256 = "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0"; - }; - - nativeBuildInputs = [ makeWrapper pkgconfig python3Packages.wrapPython ]; - - buildInputs = [ efl python3Packages.python dbus ]; - - pythonPath = [ python3Packages.pythonefl python3Packages.dbus-python ]; - - postInstall = '' - wrapPythonPrograms - ''; - - meta = { - description = "A user interface for the connman network connection manager"; - homepage = "https://enlightenment.org/"; - license = stdenv.lib.licenses.lgpl3; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx romildo ]; - }; -} diff --git a/pkgs/desktops/enlightenment/econnman/default.nix b/pkgs/desktops/enlightenment/econnman/default.nix new file mode 100644 index 0000000000000..1979b4518a708 --- /dev/null +++ b/pkgs/desktops/enlightenment/econnman/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, efl, python3Packages, dbus, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "econnman"; + version = "1.1"; + + src = fetchurl { + url = "http://download.enlightenment.org/rel/apps/econnman/${pname}-${version}.tar.gz"; + sha256 = "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0"; + }; + + nativeBuildInputs = [ makeWrapper pkgconfig python3Packages.wrapPython ]; + + buildInputs = [ efl python3Packages.python dbus ]; + + pythonPath = [ python3Packages.pythonefl python3Packages.dbus-python ]; + + postInstall = '' + wrapPythonPrograms + ''; + + meta = { + description = "A user interface for the connman network connection manager"; + homepage = "https://enlightenment.org/"; + license = stdenv.lib.licenses.lgpl3; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx romildo ]; + }; +} -- cgit 1.4.1 From 5eea1c16db7bd8aed35b596d75c7487ca0e69465 Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Fri, 31 Jul 2020 09:33:41 -0300 Subject: enlightenment.terminology: move to pkgs/desktops/enlightenment/terminology/ --- pkgs/desktops/enlightenment/default.nix | 2 +- pkgs/desktops/enlightenment/terminology.nix | 32 ---------------------- .../desktops/enlightenment/terminology/default.nix | 32 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 pkgs/desktops/enlightenment/terminology.nix create mode 100644 pkgs/desktops/enlightenment/terminology/default.nix (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix index 36b53c3c9a094..f95d75a25e1bd 100644 --- a/pkgs/desktops/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/default.nix @@ -8,7 +8,7 @@ #### APPLICATIONS econnman = callPackage ./econnman { }; - terminology = callPackage ./terminology.nix { }; + terminology = callPackage ./terminology { }; rage = callPackage ./rage.nix { }; ephoto = callPackage ./ephoto.nix { }; } diff --git a/pkgs/desktops/enlightenment/terminology.nix b/pkgs/desktops/enlightenment/terminology.nix deleted file mode 100644 index 72aab76175415..0000000000000 --- a/pkgs/desktops/enlightenment/terminology.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, pcre, mesa, makeWrapper }: - -stdenv.mkDerivation rec { - pname = "terminology"; - version = "1.8.0"; - - src = fetchurl { - url = "http://download.enlightenment.org/rel/apps/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0pvn8mdzxlx7181xdha32fbr0w8xl7hsnb3hfxr5099g841v1xf6"; - }; - - nativeBuildInputs = [ - meson - ninja - pkgconfig - makeWrapper - ]; - - buildInputs = [ - efl - pcre - mesa - ]; - - meta = { - description = "Powerful terminal emulator based on EFL"; - homepage = "https://www.enlightenment.org/about-terminology"; - license = stdenv.lib.licenses.bsd2; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx romildo ]; - }; -} diff --git a/pkgs/desktops/enlightenment/terminology/default.nix b/pkgs/desktops/enlightenment/terminology/default.nix new file mode 100644 index 0000000000000..72aab76175415 --- /dev/null +++ b/pkgs/desktops/enlightenment/terminology/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, pcre, mesa, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "terminology"; + version = "1.8.0"; + + src = fetchurl { + url = "http://download.enlightenment.org/rel/apps/${pname}/${pname}-${version}.tar.xz"; + sha256 = "0pvn8mdzxlx7181xdha32fbr0w8xl7hsnb3hfxr5099g841v1xf6"; + }; + + nativeBuildInputs = [ + meson + ninja + pkgconfig + makeWrapper + ]; + + buildInputs = [ + efl + pcre + mesa + ]; + + meta = { + description = "Powerful terminal emulator based on EFL"; + homepage = "https://www.enlightenment.org/about-terminology"; + license = stdenv.lib.licenses.bsd2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx romildo ]; + }; +} -- cgit 1.4.1 From 435a50be50d86183488833d4042efe5bcc05fcc6 Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Fri, 31 Jul 2020 09:35:20 -0300 Subject: enlightenment.rage: move to pkgs/desktops/enlightenment/rage/ --- pkgs/desktops/enlightenment/default.nix | 2 +- pkgs/desktops/enlightenment/rage.nix | 37 ---------------------------- pkgs/desktops/enlightenment/rage/default.nix | 37 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 pkgs/desktops/enlightenment/rage.nix create mode 100644 pkgs/desktops/enlightenment/rage/default.nix (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix index f95d75a25e1bd..2c68a9841ea52 100644 --- a/pkgs/desktops/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/default.nix @@ -9,6 +9,6 @@ #### APPLICATIONS econnman = callPackage ./econnman { }; terminology = callPackage ./terminology { }; - rage = callPackage ./rage.nix { }; + rage = callPackage ./rage { }; ephoto = callPackage ./ephoto.nix { }; } diff --git a/pkgs/desktops/enlightenment/rage.nix b/pkgs/desktops/enlightenment/rage.nix deleted file mode 100644 index 3c4de19fa9191..0000000000000 --- a/pkgs/desktops/enlightenment/rage.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, gst_all_1, pcre, mesa, wrapGAppsHook }: - -stdenv.mkDerivation rec { - pname = "rage"; - version = "0.3.1"; - - src = fetchurl { - url = "http://download.enlightenment.org/rel/apps/${pname}/${pname}-${version}.tar.xz"; - sha256 = "04fdk23bbgvni212zrfy4ndg7vmshbsjgicrhckdvhay87pk9i75"; - }; - - nativeBuildInputs = [ - meson - ninja - pkgconfig - mesa.dev - wrapGAppsHook - ]; - - buildInputs = [ - efl - gst_all_1.gstreamer - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-libav - pcre - ]; - - meta = { - description = "Video + Audio player along the lines of mplayer"; - homepage = "https://enlightenment.org/"; - maintainers = with stdenv.lib.maintainers; [ matejc ftrvxmtrx romildo ]; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.bsd2; - }; -} diff --git a/pkgs/desktops/enlightenment/rage/default.nix b/pkgs/desktops/enlightenment/rage/default.nix new file mode 100644 index 0000000000000..3c4de19fa9191 --- /dev/null +++ b/pkgs/desktops/enlightenment/rage/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, gst_all_1, pcre, mesa, wrapGAppsHook }: + +stdenv.mkDerivation rec { + pname = "rage"; + version = "0.3.1"; + + src = fetchurl { + url = "http://download.enlightenment.org/rel/apps/${pname}/${pname}-${version}.tar.xz"; + sha256 = "04fdk23bbgvni212zrfy4ndg7vmshbsjgicrhckdvhay87pk9i75"; + }; + + nativeBuildInputs = [ + meson + ninja + pkgconfig + mesa.dev + wrapGAppsHook + ]; + + buildInputs = [ + efl + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-libav + pcre + ]; + + meta = { + description = "Video + Audio player along the lines of mplayer"; + homepage = "https://enlightenment.org/"; + maintainers = with stdenv.lib.maintainers; [ matejc ftrvxmtrx romildo ]; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.bsd2; + }; +} -- cgit 1.4.1 From 57986d0a4a324fe6d86e7dd5eca15e089db5ef06 Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Fri, 31 Jul 2020 09:37:14 -0300 Subject: enlightenment.ephoto: move to pkgs/desktops/enlightenment/ephoto/ --- pkgs/desktops/enlightenment/default.nix | 2 +- pkgs/desktops/enlightenment/ephoto.nix | 30 -------------------------- pkgs/desktops/enlightenment/ephoto/default.nix | 30 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 pkgs/desktops/enlightenment/ephoto.nix create mode 100644 pkgs/desktops/enlightenment/ephoto/default.nix (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/enlightenment/default.nix b/pkgs/desktops/enlightenment/default.nix index 2c68a9841ea52..5c6a64b1f33d3 100644 --- a/pkgs/desktops/enlightenment/default.nix +++ b/pkgs/desktops/enlightenment/default.nix @@ -10,5 +10,5 @@ econnman = callPackage ./econnman { }; terminology = callPackage ./terminology { }; rage = callPackage ./rage { }; - ephoto = callPackage ./ephoto.nix { }; + ephoto = callPackage ./ephoto { }; } diff --git a/pkgs/desktops/enlightenment/ephoto.nix b/pkgs/desktops/enlightenment/ephoto.nix deleted file mode 100644 index 36719200c7616..0000000000000 --- a/pkgs/desktops/enlightenment/ephoto.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, efl, pcre, mesa, makeWrapper }: - -stdenv.mkDerivation rec { - pname = "ephoto"; - version = "1.5"; - - src = fetchurl { - url = "http://www.smhouston.us/stuff/${pname}-${version}.tar.gz"; - sha256 = "09kraa5zz45728h2dw1ssh23b87j01bkfzf977m48y1r507sy3vb"; - }; - - nativeBuildInputs = [ - pkgconfig - mesa.dev # otherwise pkg-config does not find gbm - makeWrapper - ]; - - buildInputs = [ - efl - pcre - ]; - - meta = { - description = "Image viewer and editor written using the Enlightenment Foundation Libraries"; - homepage = "https://smhouston.us/projects/ephoto/"; - license = stdenv.lib.licenses.bsd2; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.romildo ]; - }; -} diff --git a/pkgs/desktops/enlightenment/ephoto/default.nix b/pkgs/desktops/enlightenment/ephoto/default.nix new file mode 100644 index 0000000000000..36719200c7616 --- /dev/null +++ b/pkgs/desktops/enlightenment/ephoto/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, pkgconfig, efl, pcre, mesa, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "ephoto"; + version = "1.5"; + + src = fetchurl { + url = "http://www.smhouston.us/stuff/${pname}-${version}.tar.gz"; + sha256 = "09kraa5zz45728h2dw1ssh23b87j01bkfzf977m48y1r507sy3vb"; + }; + + nativeBuildInputs = [ + pkgconfig + mesa.dev # otherwise pkg-config does not find gbm + makeWrapper + ]; + + buildInputs = [ + efl + pcre + ]; + + meta = { + description = "Image viewer and editor written using the Enlightenment Foundation Libraries"; + homepage = "https://smhouston.us/projects/ephoto/"; + license = stdenv.lib.licenses.bsd2; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.romildo ]; + }; +} -- cgit 1.4.1