* [PATCH] gnu: Add rofi.
@ 2016-05-20 4:29 Danny Milosavljevic
2016-05-23 4:28 ` Leo Famulari
0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2016-05-20 4:29 UTC (permalink / raw)
To: guix-devel
From: Danny Milosavljevic <dannym@scratchpost.org>
* gnu/packages/xdisorg.scm (rofi): New variable.
---
gnu/packages/xdisorg.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ca198c3..9f708e5 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -907,3 +907,35 @@ demos. It also acts as a nice screen locker.")
(string-append
"http://metadata.ftp-master.debian.org/changelogs/"
"/main/x/xscreensaver/xscreensaver_5.34-2_copyright")))))
+
+(define-public rofi
+ (package
+ (name "rofi")
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/DaveDavenport/rofi/releases/download/" version "/rofi-" version ".tar.xz"))
+ (sha256
+ (base32
+ "01jxml9vk4cw7pngpan7dipmb98s6ibh6f0023lw3hbgxy650637"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f))
+ (home-page "https://davedavenport.github.io/rofi/")
+ (synopsis "Application Launcher")
+ (description "Rofi is a minimalist Application Launcher. It memorizes which applications you regularily use and also allows you to search for an application by name.")
+ (inputs
+ `(("libx11" ,libx11)
+ ("libxinerama" ,libxinerama)
+ ("libxft" ,libxft)
+ ("pango" ,pango)
+ ("cairo" ,cairo)
+ ("glib" ,glib)
+ ("startup-notification" ,startup-notification)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxcb" ,libxcb)
+ ("xcb-util" ,xcb-util)
+ ("xcb-util-wm" ,xcb-util-wm)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (license license:expat)))
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] gnu: Add rofi.
2016-05-20 4:29 [PATCH] gnu: Add rofi Danny Milosavljevic
@ 2016-05-23 4:28 ` Leo Famulari
2016-05-24 6:55 ` Danny Milosavljevic
0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2016-05-23 4:28 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
On Fri, May 20, 2016 at 06:29:52AM +0200, Danny Milosavljevic wrote:
> * gnu/packages/xdisorg.scm (rofi): New variable.
Thanks for the patch! I'd never heard of this program but as someone who
uses dmenu a lot, I'd like to try it out.
> +(define-public rofi
> + (uri (string-append "https://github.com/DaveDavenport/rofi/releases/download/" version "/rofi-" version ".tar.xz"))
Lines should be shorter than 80 characters whenever possible. `guix lint
rofi` should warn about this :)
> + (arguments
> + `(#:tests? #f))
The failing test (helper_expand) seems to fail when it can't find
`which`. There are examples of how to patch scripts with the path to our
`which` in gnu/packages. Can you try it out?
> + (synopsis "Application Launcher")
> + (description "Rofi is a minimalist Application Launcher. It memorizes which applications you regularily use and also allows you to search for an application by name.")
I think that "Launcher" should not start with a capital letter.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] gnu: Add rofi.
2016-05-23 4:28 ` Leo Famulari
@ 2016-05-24 6:55 ` Danny Milosavljevic
2016-05-25 3:38 ` Leo Famulari
0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2016-05-24 6:55 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel, Danny Milosavljevic
On Mon, 23 May 2016 00:28:26 -0400
Leo Famulari <leo@famulari.name> wrote:
> The failing test (helper_expand) seems to fail when it can't find
> `which`.
The failing test is test/helper-expand.c and it tries to do this:
int main ( int argc, char ** argv )
{
cmd_set_arguments ( argc, argv );
if ( setlocale ( LC_ALL, "" ) == NULL ) {
fprintf ( stderr, "Failed to set locale.\n" );
return EXIT_FAILURE;
}
/**
* Test some path functions. Not easy as not sure what is right output on travis.
*/
// Test if root is preserved.
char *str = rofi_expand_path ( "/" );
TASSERT ( strcmp ( str, "/" ) == 0 );
g_free ( str );
// Test is relative path is preserved.
str = rofi_expand_path ( "../AUTHORS" );
TASSERT ( strcmp ( str, "../AUTHORS" ) == 0 );
g_free ( str );
// Test another one.
str = rofi_expand_path ( "/bin/false" );
TASSERT ( strcmp ( str, "/bin/false" ) == 0 );
g_free ( str );
// See if user paths get expanded in full path.
str = rofi_expand_path ( "~/" ); <----- oh oh
const char *hd = g_get_home_dir ();
TASSERT ( strcmp ( str, hd ) == 0 );
g_free ( str );
str = rofi_expand_path ( "~root/" ); <--- oh oh
TASSERT ( str[0] == '/' );
g_free ( str );
}
And rofi_expand_path does
char *rofi_expand_path ( const char *input )
{
char **str = g_strsplit ( input, G_DIR_SEPARATOR_S, -1 );
for ( unsigned int i = 0; str && str[i]; i++ ) {
// Replace ~ with current user homedir.
if ( str[i][0] == '~' && str[i][1] == '\0' ) {
g_free ( str[i] );
str[i] = g_strdup ( g_get_home_dir () ); <----------- oh oh
}
// If other user, ask getpwnam.
else if ( str[i][0] == '~' ) {
struct passwd *p = getpwnam ( &( str[i][1] ) ); <---------- oh oh
if ( p != NULL ) {
g_free ( str[i] );
str[i] = g_strdup ( p->pw_dir );
}
}
else if ( i == 0 ) {
char * s = str[i];
if ( input[0] == G_DIR_SEPARATOR ) {
str[i] = g_strdup_printf ( "%s%s", G_DIR_SEPARATOR_S, s );
g_free ( s );
}
}
}
char *retv = g_build_filenamev ( str );
g_strfreev ( str );
return retv;
}
What should we do about it?
The "which" part is just rofi trying to find out whether it has been checked out from git or expanded from a release tarball.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] gnu: Add rofi.
2016-05-24 6:55 ` Danny Milosavljevic
@ 2016-05-25 3:38 ` Leo Famulari
2016-05-26 0:56 ` [PATCH v2] * gnu/packages/xdisorg.scm (rofi): New variable Danny Milosavljevic
0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2016-05-25 3:38 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel, Danny Milosavljevic
On Tue, May 24, 2016 at 08:55:02AM +0200, Danny Milosavljevic wrote:
> On Mon, 23 May 2016 00:28:26 -0400
> Leo Famulari <leo@famulari.name> wrote:
>
> > The failing test (helper_expand) seems to fail when it can't find
> > `which`.
>
> The failing test is test/helper-expand.c and it tries to do this:
>
> str = rofi_expand_path ( "~/" ); <----- oh oh
[...]
> str = rofi_expand_path ( "~root/" ); <--- oh oh
[...]
> str[i] = g_strdup ( g_get_home_dir () ); <----------- oh oh
[...]
> struct passwd *p = getpwnam ( &( str[i][1] ) ); <---------- oh oh
> What should we do about it?
How about disabling that test only? You can comment it out of wherever
it's invoked, or make it return true immediately. I'm not sure if we
have a canonical method... I think it depends on the language and
implementation.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] * gnu/packages/xdisorg.scm (rofi): New variable.
2016-05-25 3:38 ` Leo Famulari
@ 2016-05-26 0:56 ` Danny Milosavljevic
2016-05-27 17:41 ` Leo Famulari
0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2016-05-26 0:56 UTC (permalink / raw)
To: guix-devel
From: Danny Milosavljevic <dannym@scratchpost.org>
---
gnu/packages/xdisorg.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ca198c3..ff365f6 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -907,3 +907,42 @@ demos. It also acts as a nice screen locker.")
(string-append
"http://metadata.ftp-master.debian.org/changelogs/"
"/main/x/xscreensaver/xscreensaver_5.34-2_copyright")))))
+
+(define-public rofi
+ (package
+ (name "rofi")
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/DaveDavenport/rofi/releases/download/" version "/rofi-" version ".tar.xz"))
+ (sha256
+ (base32
+ "01jxml9vk4cw7pngpan7dipmb98s6ibh6f0023lw3hbgxy650637"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'adjust-tests
+ (lambda _
+ (substitute* '("test/helper-expand.c")
+ (("~root") "/root")
+ (("~") "")
+ (("g_get_home_dir \\(\\)") "\"/\"")))))))
+ (home-page "https://davedavenport.github.io/rofi/")
+ (synopsis "Application Launcher")
+ (description "Rofi is a minimalist Application Launcher. It memorizes which applications you regularily use and also allows you to search for an application by name.")
+ (inputs
+ `(("libx11" ,libx11)
+ ("libxinerama" ,libxinerama)
+ ("libxft" ,libxft)
+ ("pango" ,pango)
+ ("cairo" ,cairo)
+ ("glib" ,glib)
+ ("startup-notification" ,startup-notification)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxcb" ,libxcb)
+ ("xcb-util" ,xcb-util)
+ ("xcb-util-wm" ,xcb-util-wm)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (license license:expat)))
--
2.7.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] * gnu/packages/xdisorg.scm (rofi): New variable.
2016-05-26 0:56 ` [PATCH v2] * gnu/packages/xdisorg.scm (rofi): New variable Danny Milosavljevic
@ 2016-05-27 17:41 ` Leo Famulari
2016-05-27 18:23 ` [PATCH v3] gnu: Add rofi Danny Milosavljevic
0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2016-05-27 17:41 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
On Thu, May 26, 2016 at 02:56:19AM +0200, Danny Milosavljevic wrote:
> +(define-public rofi
[...]
> + (inputs
> + `(("libx11" ,libx11)
> + ("libxinerama" ,libxinerama)
> + ("libxft" ,libxft)
> + ("pango" ,pango)
> + ("cairo" ,cairo)
> + ("glib" ,glib)
> + ("startup-notification" ,startup-notification)
> + ("libxkbcommon" ,libxkbcommon)
> + ("libxcb" ,libxcb)
> + ("xcb-util" ,xcb-util)
> + ("xcb-util-wm" ,xcb-util-wm)))
I wondered about this long list of inputs, so I did this:
$ guix gc --references $(./pre-inst-env guix build rofi)
/gnu/store/52cf2idzxj1kqf6lwxwfc1vlvjrrp5sx-pango-1.40.1
/gnu/store/6qrijb6cfyvs8svacr0l9a75vcpypr5f-glib-2.48.0
/gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22
/gnu/store/b1yqjimbdh5bf9jnizd4h7yf110744j2-bash-4.3.42
/gnu/store/cp042h32w66hklsafrsd95pgzmrnnkbr-rofi-1.0.1
/gnu/store/fdknlx9f4dbf3xd43fbq1p2l60a4y7fj-xcb-util-0.4.0
/gnu/store/gq3w4clm6lva2bm1g3g71xybxjywcdki-cairo-1.14.6
/gnu/store/jsy847sch7lnxjppkn1s1as22dbx74fx-libxcb-1.11
/gnu/store/q3vxfm6wsiv1krzcpagx9452fr6r55zw-startup-notification-0.12
/gnu/store/v39bh3ln3ncnzhyw0kd12d46kww9747v-gcc-4.9.3-lib
/gnu/store/xqzmjw2b2j5i9pmkjmnjp3dm7hdiqln0-libx11-1.6.3
/gnu/store/y4147j71yb2dyycaa0xys0mbgif1wyfs-libxkbcommon-0.5.0
/gnu/store/zibwcnngq3icn435pkkd5df9lvjc25b3-xcb-util-wm-0.4.1
Since libxft and libxinerama are not referred to by the result of the
build, I removed them from (inputs) in the attached revision.
Can you make sure it still works for you with this change?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3] gnu: Add rofi.
2016-05-27 17:41 ` Leo Famulari
@ 2016-05-27 18:23 ` Danny Milosavljevic
2016-05-27 18:35 ` Leo Famulari
0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2016-05-27 18:23 UTC (permalink / raw)
To: guix-devel
I tried with the inputs removed and it still works fine. See below for the new patch.
From: Danny Milosavljevic <dannym@scratchpost.org>
* gnu/packages/xdisorg.scm (rofi): New variable.
---
gnu/packages/xdisorg.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ca198c3..9f17ad0 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -907,3 +907,45 @@ demos. It also acts as a nice screen locker.")
(string-append
"http://metadata.ftp-master.debian.org/changelogs/"
"/main/x/xscreensaver/xscreensaver_5.34-2_copyright")))))
+
+(define-public rofi
+ (package
+ (name "rofi")
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/DaveDavenport/rofi/releases/download/"
+ version "/rofi-" version ".tar.xz"))
+ (sha256
+ (base32
+ "01jxml9vk4cw7pngpan7dipmb98s6ibh6f0023lw3hbgxy650637"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'adjust-tests
+ (lambda _
+ (substitute* '("test/helper-expand.c")
+ (("~root") "/root")
+ (("~") "")
+ (("g_get_home_dir \\(\\)") "\"/\"")))))))
+ (home-page "https://davedavenport.github.io/rofi/")
+ (synopsis "Application Launcher")
+ (description "Rofi is a minimalist Application Launcher. It memorizes which
+applications you regularily use and also allows you to search for them by name.")
+ (inputs
+ `(("libx11" ,libx11)
+ ("libxinerama" ,libxinerama)
+ ("libxft" ,libxft)
+ ("pango" ,pango)
+ ("cairo" ,cairo)
+ ("glib" ,glib)
+ ("startup-notification" ,startup-notification)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxcb" ,libxcb)
+ ("xcb-util" ,xcb-util)
+ ("xcb-util-wm" ,xcb-util-wm)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (license license:expat)))
--
2.8.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3] gnu: Add rofi.
2016-05-27 18:23 ` [PATCH v3] gnu: Add rofi Danny Milosavljevic
@ 2016-05-27 18:35 ` Leo Famulari
2016-05-27 18:54 ` Danny Milosavljevic
0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2016-05-27 18:35 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
On Fri, May 27, 2016 at 08:23:31PM +0200, Danny Milosavljevic wrote:
> I tried with the inputs removed and it still works fine. See below for the new patch.
Gah, I forgot to attach my patch. It's attached now, with the unused
packages removed.
> + (inputs
> + `(("libx11" ,libx11)
> + ("libxinerama" ,libxinerama)
> + ("libxft" ,libxft)
They're still here ;)
[-- Attachment #2: 0001-gnu-rofi-New-variable.patch --]
[-- Type: text/x-diff, Size: 2300 bytes --]
From c79cb8dd71029c7042fa16ccb6178920d9fd2cb9 Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@scratchpost.org>
Date: Thu, 26 May 2016 02:56:19 +0200
Subject: [PATCH] gnu: rofi: New variable.
* gnu/packages/xdisorg.scm (rofi): New variable.
Signed-off-by: Leo Famulari <leo@famulari.name>
---
gnu/packages/xdisorg.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 64a95d6..2e0ea12 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -910,3 +910,44 @@ demos. It also acts as a nice screen locker.")
(string-append
"http://metadata.ftp-master.debian.org/changelogs/"
"/main/x/xscreensaver/xscreensaver_5.34-2_copyright")))))
+
+(define-public rofi
+ (package
+ (name "rofi")
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/DaveDavenport/rofi/"
+ "releases/download/"
+ version "/rofi-" version ".tar.xz"))
+ (sha256
+ (base32
+ "01jxml9vk4cw7pngpan7dipmb98s6ibh6f0023lw3hbgxy650637"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'adjust-tests
+ (lambda _
+ (substitute* '("test/helper-expand.c")
+ (("~root") "/root")
+ (("~") "")
+ (("g_get_home_dir \\(\\)") "\"/\"")))))))
+ (home-page "https://davedavenport.github.io/rofi/")
+ (synopsis "Application Launcher")
+ (description "Rofi is a minimalist Application Launcher. It memorizes which
+applications you regularily use and also allows you to search for an application
+by name.")
+ (inputs
+ `(("libx11" ,libx11)
+ ("pango" ,pango)
+ ("cairo" ,cairo)
+ ("glib" ,glib)
+ ("startup-notification" ,startup-notification)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxcb" ,libxcb)
+ ("xcb-util" ,xcb-util)
+ ("xcb-util-wm" ,xcb-util-wm)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (license license:expat)))
--
2.8.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3] gnu: Add rofi.
2016-05-27 18:35 ` Leo Famulari
@ 2016-05-27 18:54 ` Danny Milosavljevic
2016-05-31 21:25 ` Leo Famulari
0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2016-05-27 18:54 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel, Danny Milosavljevic
On Fri, 27 May 2016 14:35:25 -0400
Leo Famulari <leo@famulari.name> wrote:
> Gah, I forgot to attach my patch. It's attached now, with the unused
> packages removed.
Yeah, I installed your version and tried it out. Works fine.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] gnu: Add rofi.
2016-05-27 18:54 ` Danny Milosavljevic
@ 2016-05-31 21:25 ` Leo Famulari
0 siblings, 0 replies; 10+ messages in thread
From: Leo Famulari @ 2016-05-31 21:25 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel, Danny Milosavljevic
On Fri, May 27, 2016 at 08:54:53PM +0200, Danny Milosavljevic wrote:
> On Fri, 27 May 2016 14:35:25 -0400
> Leo Famulari <leo@famulari.name> wrote:
>
> > Gah, I forgot to attach my patch. It's attached now, with the unused
> > packages removed.
>
> Yeah, I installed your version and tried it out. Works fine.
Great, applied as f40dfcd055!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-05-31 21:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 4:29 [PATCH] gnu: Add rofi Danny Milosavljevic
2016-05-23 4:28 ` Leo Famulari
2016-05-24 6:55 ` Danny Milosavljevic
2016-05-25 3:38 ` Leo Famulari
2016-05-26 0:56 ` [PATCH v2] * gnu/packages/xdisorg.scm (rofi): New variable Danny Milosavljevic
2016-05-27 17:41 ` Leo Famulari
2016-05-27 18:23 ` [PATCH v3] gnu: Add rofi Danny Milosavljevic
2016-05-27 18:35 ` Leo Famulari
2016-05-27 18:54 ` Danny Milosavljevic
2016-05-31 21:25 ` Leo Famulari
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.