Add gmrun-0.9.2

Signed-off-by: Baptist BENOIST <return_0@live.com>

+150
+39
pkgs/applications/misc/gmrun/default.nix
··· 1 + { stdenv, fetchurl, glib, gtk2, pkgconfig, popt }: 2 + 3 + let 4 + version = "0.9.2"; 5 + in 6 + 7 + stdenv.mkDerivation rec { 8 + name = "gmrun-${version}"; 9 + 10 + src = fetchurl { 11 + url = "http://downloads.sourceforge.net/project/gmrun/gmrun/${version}/${name}.tar.gz"; 12 + md5 = "6cef37a968006d9496fc56a7099c603c"; 13 + }; 14 + 15 + buildInputs = [ glib gtk2 pkgconfig popt ]; 16 + 17 + doCheck = true; 18 + 19 + enableParallelBuilding = true; 20 + 21 + patches = [ 22 + ./gcc43.patch 23 + ./gmrun-0.9.2-xdg.patch 24 + ]; 25 + 26 + meta = { 27 + description = "Gnome Completion-Run Utility."; 28 + longDescription = '' 29 + A simple program which provides a "run program" window, featuring a bash-like TAB completion. 30 + It uses GTK+ interface. 31 + Also, supports CTRL-R / CTRL-S / "!" for searching through history. 32 + Running commands in a terminal with CTRL-Enter. URL handlers. 33 + ''; 34 + homepage = "http://sourceforge.net/projects/gmrun/"; 35 + license = "GPL"; 36 + maintainers = [ stdenv.lib.maintainers.bbenoist ]; 37 + platforms = stdenv.lib.platforms.all; 38 + }; 39 + }
+51
pkgs/applications/misc/gmrun/gcc43.patch
··· 1 + --- a/src/gtkcompletionline.cc.orig 2003-11-16 11:55:07.000000000 +0100 2 + +++ a/src/gtkcompletionline.cc 2008-05-08 08:51:22.000000000 +0200 3 + @@ -29,6 +29,7 @@ 4 + #include <set> 5 + #include <sstream> 6 + #include <string> 7 + +#include <cstring> 8 + #include <vector> 9 + using namespace std; 10 + 11 + --- a/src/ci_string.h.orig 2001-05-16 16:39:31.000000000 +0200 12 + +++ a/src/ci_string.h 2008-05-08 08:51:33.000000000 +0200 13 + @@ -7,6 +7,7 @@ 14 + #define __CI_STRING_H__ 15 + 16 + #include <string> 17 + +#include <cstring> 18 + #include <ctype.h> 19 + 20 + struct ci_char_traits : public std::char_traits<char> 21 + --- a/src/prefs.cc.orig 2002-08-16 12:48:22.000000000 +0200 22 + +++ a/src/prefs.cc 2008-05-08 08:51:54.000000000 +0200 23 + @@ -13,6 +13,7 @@ 24 + #include <fstream> 25 + #include <iostream> 26 + #include <stdio.h> 27 + +#include <stdlib.h> 28 + 29 + #include <list> 30 + 31 + --- a/src/main.cc.orig 2003-11-16 11:55:07.000000000 +0100 32 + +++ a/src/main.cc 2008-05-08 09:03:11.000000000 +0200 33 + @@ -14,6 +14,7 @@ 34 + #include <gdk/gdkkeysyms.h> 35 + 36 + #include <string> 37 + +#include <cstring> 38 + #include <iostream> 39 + #include <sstream> 40 + #include <vector> 41 + 42 + --- a/src/gtkcompletionline.cc.orig 2009-06-19 22:38:14.000000000 +0400 43 + +++ a/src/gtkcompletionline.cc 2009-06-19 22:37:14.000000000 +0400 44 + @@ -376,7 +377,7 @@ 45 + return 0; 46 + } 47 + 48 + -int my_alphasort(const void* va, const void* vb) { 49 + +int my_alphasort(const dirent** va, const dirent** vb) { 50 + const struct dirent** a = (const struct dirent**)va; 51 + const struct dirent** b = (const struct dirent**)vb;
+58
pkgs/applications/misc/gmrun/gmrun-0.9.2-xdg.patch
··· 1 + diff -ur a/src/history.cc src/history.cc 2 + --- a/src/history.cc 2002-08-17 15:19:31.000000000 +0200 3 + +++ a/src/history.cc 2012-06-04 23:42:35.314653414 +0200 4 + @@ -24,8 +24,15 @@ 5 + HistoryFile::HistoryFile() 6 + { 7 + m_file_entries = 0; 8 + - m_filename = g_get_home_dir(); 9 + - m_filename += "/.gmrun_history"; 10 + + const char* filename = getenv("XDG_CACHE_HOME"); 11 + + if (filename != 0 && *filename != '\0') { 12 + + m_filename = filename; 13 + + m_filename += "/gmrun_history"; 14 + + } 15 + + else { 16 + + m_filename = g_get_home_dir(); 17 + + m_filename += "/.gmrun_history"; 18 + + } 19 + m_current = 0; 20 + m_default_set = false; 21 + read_the_file(); 22 + diff -ur a/src/prefs.cc src/prefs.cc 23 + --- a/src/prefs.cc 2012-06-04 22:35:00.671949439 +0200 24 + +++ a/src/prefs.cc 2012-06-04 23:24:24.184445962 +0200 25 + @@ -35,12 +35,29 @@ 26 + file_name += GMRUNRC; 27 + init(file_name); 28 + 29 + - file_name = getenv("HOME"); 30 + - if (!file_name.empty()) { 31 + + file_name.clear(); 32 + + const char* filename = getenv("XDG_CONFIG_HOME"); 33 + + if (filename != 0 && *filename != '\0') { 34 + + file_name = filename; 35 + string::iterator i = file_name.end() - 1; 36 + - if (*i == '/') file_name.erase(i); 37 + - file_name += "/."; 38 + + if (*i != '/') { 39 + + file_name += '/'; 40 + + } 41 + file_name += GMRUNRC; 42 + + } 43 + + else { 44 + + filename = getenv("HOME"); 45 + + if (filename != 0 && *filename != '\0') { 46 + + file_name = filename; 47 + + string::iterator i = file_name.end() - 1; 48 + + if (*i != '/') { 49 + + file_name += '/'; 50 + + } 51 + + file_name += '.'; 52 + + file_name += GMRUNRC; 53 + + } 54 + + } 55 + + if (!file_name.empty()) { 56 + init(file_name); 57 + } 58 + }
+2
pkgs/top-level/all-packages.nix
··· 7051 7051 pcre = pcre.override { unicodeSupport = true; }; 7052 7052 }; 7053 7053 7054 + gmrun = callPackage ../applications/misc/gmrun {}; 7055 + 7054 7056 gnucash = callPackage ../applications/office/gnucash { 7055 7057 inherit (gnome) libgnomeui libgtkhtml gtkhtml libbonoboui libgnomeprint; 7056 7058 gconf = gnome.GConf;