fehlstart: unstable-2016-05-23 -> 0.5-unstable-2025-01-12

This commit is contained in:
TomaSajt 2025-07-12 03:17:33 +02:00
parent 85dab74090
commit d3274f6f23
No known key found for this signature in database
GPG Key ID: F011163C050122A1
2 changed files with 34 additions and 28 deletions

View File

@ -2,39 +2,45 @@
lib,
stdenv,
pkg-config,
gtk2,
keybinder,
fetchFromGitLab,
gtk3,
glib,
keybinder3,
fetchFromGitea,
}:
stdenv.mkDerivation {
pname = "fehlstart";
version = "unstable-2016-05-23";
version = "0.5-unstable-2025-01-12";
src = fetchFromGitLab {
owner = "fehlstart";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "chuvok";
repo = "fehlstart";
rev = "9f4342d75ec5e2a46c13c99c34894bc275798441";
sha256 = "1rfzh7w6n2s9waprv7m1bhvqrk36a77ada7w655pqiwkhdj5q95i";
rev = "cf08d6c3964da9abc8d1af0725894fef62352064";
hash = "sha256-qq0IhLzSvYnooPb4w+lno8P/tbedrDKTk27HGtQlp2I=";
};
patches = [ ./use-nix-profiles.patch ];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gtk2
keybinder
gtk3
keybinder3
];
preConfigure = ''
export PREFIX=$out
'';
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev glib}/include/gio-unix-2.0";
meta = with lib; {
makeFlags = [ "PREFIX=$(out)" ];
meta = {
description = "Small desktop application launcher with reasonable memory footprint";
homepage = "https://gitlab.com/fehlstart/fehlstart";
license = licenses.gpl3;
maintainers = [ maintainers.mounium ];
platforms = platforms.all;
homepage = "https://codeberg.org/Chuvok/fehlstart";
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.mounium ];
platforms = lib.platforms.linux;
mainProgram = "fehlstart";
};
}

View File

@ -1,21 +1,21 @@
--- fehlstart-9f4342d75ec5e2a46c13c99c34894bc275798441-src/fehlstart.c 1970-01-01 01:00:01.000000000 +0100
+++ fehlstart.c 2016-08-10 12:21:11.231638418 +0200
@@ -779,8 +779,15 @@
read_settings(setting_file, &settings);
update_commands();
g_hash_table_foreach(action_map, update_launcher, NULL);
- add_launchers(STR_S(APPLICATIONS_DIR_0));
- add_launchers(STR_S(APPLICATIONS_DIR_1));
- add_launchers(STR_S(USER_APPLICATIONS_DIR));
diff --git a/fehlstart.c b/fehlstart.c
index b33c8ff..ce467b5 100644
--- a/fehlstart.c
+++ b/fehlstart.c
@@ -802,6 +802,16 @@ static void* update_all(void* user_data)
add_launchers(APPLICATIONS_DIR_0);
add_launchers(APPLICATIONS_DIR_1);
add_launchers(USER_APPLICATIONS_DIR);
+ const char* nixprofiles = getenv("NIX_PROFILES");
+ if(nixprofiles != NULL) {
+ const char* pch = strtok(nixprofiles, " ");
+ while (pch != NULL)
+ {
+ String nix_dir = str_concat((String) { pch, strlen(pch), false },STR_S("/share/applications"));
+ char* nix_dir = g_strconcat(pch, "/share/applications", NULL);
+ add_launchers(nix_dir);
+ pch = strtok(NULL, " ");
+ }
+ }
return NULL;
}