From 40f6d7ea5d20c35a949c74f02af2b8be4057227f Mon Sep 17 00:00:00 2001 From: Katona László Date: Wed, 10 Aug 2016 12:37:56 +0200 Subject: fehlstart: init at 9f4342d7 --- pkgs/applications/misc/fehlstart/default.nix | 27 ++++++++++++++++++++++ .../misc/fehlstart/use-nix-profiles.patch | 21 +++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 pkgs/applications/misc/fehlstart/default.nix create mode 100644 pkgs/applications/misc/fehlstart/use-nix-profiles.patch diff --git a/pkgs/applications/misc/fehlstart/default.nix b/pkgs/applications/misc/fehlstart/default.nix new file mode 100644 index 0000000000000..35b66299c06d1 --- /dev/null +++ b/pkgs/applications/misc/fehlstart/default.nix @@ -0,0 +1,27 @@ +{ stdenv, pkgconfig, gtk2, keybinder, fetchFromGitLab }: + +stdenv.mkDerivation { + name = "fehlstart-9f4342d7"; + + src = fetchFromGitLab { + owner = "fehlstart"; + repo = "fehlstart"; + rev = "9f4342d75ec5e2a46c13c99c34894bc275798441"; + sha256 = "1rfzh7w6n2s9waprv7m1bhvqrk36a77ada7w655pqiwkhdj5q95i"; + }; + + patches = [ ./use-nix-profiles.patch ]; + buildInputs = [ pkgconfig gtk2 keybinder ]; + + preConfigure = '' + export PREFIX=$out + ''; + + meta = with stdenv.lib; { + description = "Small desktop application launcher with reasonable memory footprint"; + homepage = https://gitlab.com/fehlstart/fehlstart; + licence = licenses.gpl3; + maintainers = [ maintainers.mounium ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/misc/fehlstart/use-nix-profiles.patch b/pkgs/applications/misc/fehlstart/use-nix-profiles.patch new file mode 100644 index 0000000000000..0c06e53f98148 --- /dev/null +++ b/pkgs/applications/misc/fehlstart/use-nix-profiles.patch @@ -0,0 +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)); ++ 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")); ++ add_launchers(nix_dir); ++ pch = strtok(NULL, " "); ++ } ++ } + return NULL; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad459c2e8ffcb..a8c652cdebe4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13004,6 +13004,8 @@ in fbreader = callPackage ../applications/misc/fbreader { }; + fehlstart = callPackage ../applications/misc/fehlstart { }; + fetchmail = callPackage ../applications/misc/fetchmail { }; flacon = callPackage ../applications/audio/flacon { }; -- cgit 1.4.1