From d3274f6f233a8da2d468f4bc9a09dfcd323c9dcd Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 12 Jul 2025 03:17:33 +0200 Subject: [PATCH] fehlstart: unstable-2016-05-23 -> 0.5-unstable-2025-01-12 --- pkgs/by-name/fe/fehlstart/package.nix | 42 +++++++++++-------- .../fe/fehlstart/use-nix-profiles.patch | 20 ++++----- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/pkgs/by-name/fe/fehlstart/package.nix b/pkgs/by-name/fe/fehlstart/package.nix index 7c289e51688e..175a6ebf7921 100644 --- a/pkgs/by-name/fe/fehlstart/package.nix +++ b/pkgs/by-name/fe/fehlstart/package.nix @@ -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"; }; } diff --git a/pkgs/by-name/fe/fehlstart/use-nix-profiles.patch b/pkgs/by-name/fe/fehlstart/use-nix-profiles.patch index 0c06e53f9814..32758ae231ec 100644 --- a/pkgs/by-name/fe/fehlstart/use-nix-profiles.patch +++ b/pkgs/by-name/fe/fehlstart/use-nix-profiles.patch @@ -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; } +