Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-12 Thread Eduard Carreras i Nadal
El 12/10/2012 1:39, Eelco Dolstra eelco.dols...@logicblox.com va
escriure:

 Hi,

 On 11/10/12 19:32, Eelco Dolstra wrote:

  However, a much cleaner solution would be to make the panel use
$XDG_DATA_DIRS
  for finding the *.desktop files of the plugins.  That would be more
general
  because it would allow users to have their own plugins in their home
directories
  (so upstream might be willing to accept/implement something like this).

 Or maybe not, since Xfce apparently used to do this:

 https://bugzilla.xfce.org/show_bug.cgi?id=5455

Wow, then I will patch the LIBDIR as I've done with DATADIR.

Cheers,


 --
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
 ___
 nix-dev mailing list
 nix-dev@lists.science.uu.nl
 http://lists.science.uu.nl/mailman/listinfo/nix-dev
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-12 Thread Eduard Carreras i Nadal
On Fri, Oct 12, 2012 at 8:38 AM, Eduard Carreras i Nadal 
ecarre...@gmail.com wrote:


 El 12/10/2012 1:39, Eelco Dolstra eelco.dols...@logicblox.com va
 escriure:

 
  Hi,
 
  On 11/10/12 19:32, Eelco Dolstra wrote:
 
   However, a much cleaner solution would be to make the panel use
 $XDG_DATA_DIRS
   for finding the *.desktop files of the plugins.  That would be more
 general
   because it would allow users to have their own plugins in their home
 directories
   (so upstream might be willing to accept/implement something like this).
 
  Or maybe not, since Xfce apparently used to do this:
 
  https://bugzilla.xfce.org/show_bug.cgi?id=5455

 Wow, then I will patch the LIBDIR as I've done with DATADIR.

Patched works fine, I've submited a pull-request for comments:
https://github.com/NixOS/nixpkgs/pull/150

Cheers,


-- 
Eduard Carreras i Nadal ecarre...@gmail.com
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-11 Thread Eduard Carreras i Nadal
[...]

  Then I tried to install this package with nix-env -i
 /nix/store/**gas9rjahhdxkksv7k3fbq4kwgp17xr**
 vf-xfce4-cpufreq-plugin-1.0.0
 but when I try to add the plugin there is not cpufreq plugin in the list
 of xfce4 panel plugins.


Starting xfce4-panel with debugging:
$ xfce4-panel -q
$ PANEL_DEBUG=1 xfce4-panel

Then when I'm going to add a plugin shows:
xfce4-panel(module-factory): reading
/nix/store/8mik6lfry6sdjkvq25rqnbia00qjjx4p-xfce4-panel-4.8.6/share/xfce4/panel/plugins

And ls -1
/nix/store/8mik6lfry6sdjkvq25rqnbia00qjjx4p-xfce4-panel-4.8.6/share/xfce4/panel/plugins
actions.desktop
applicationsmenu.desktop
clock.desktop
directorymenu.desktop
launcher.desktop
pager.desktop
separator.desktop
showdesktop.desktop
systray.desktop
tasklist.desktop
windowmenu.desktop

Which are the only plugins listed

Cheers,

-- 
Eduard Carreras i Nadal ecarre...@gmail.com
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-11 Thread Eduard Carreras i Nadal
On Thu, Oct 11, 2012 at 11:53 PM, Eduard Carreras i Nadal 
ecarre...@gmail.com wrote:

 [...]

  Then I tried to install this package with nix-env -i
 /nix/store/**gas9rjahhdxkksv7k3fbq4kwgp17xr**
 vf-xfce4-cpufreq-plugin-1.0.0
 but when I try to add the plugin there is not cpufreq plugin in the list
 of xfce4 panel plugins.


 Starting xfce4-panel with debugging:
 $ xfce4-panel -q
 $ PANEL_DEBUG=1 xfce4-panel

 Then when I'm going to add a plugin shows:
 xfce4-panel(module-factory): reading
 /nix/store/8mik6lfry6sdjkvq25rqnbia00qjjx4p-xfce4-panel-4.8.6/share/xfce4/panel/plugins


More info: I've modified the xfce4-panel nix expression adding

  postInstall = ''
  mkdir -p $out/share/xfce4/panel-plugins
  '';

Then the log shows

xfce4-panel(module-factory): reading
/nix/store/kkadh1cq40y0rcn5l2i6pnxf3jcjv4zi-xfce4-panel-4.8.6/share/xfce4/panel/plugins
xfce4-panel(module-factory): reading
/nix/store/kkadh1cq40y0rcn5l2i6pnxf3jcjv4zi-xfce4-panel-4.8.6/share/xfce4/panel-plugins


But other line says
xfce4-panel(applicationsmenu): loading from
/run/current-system/sw/etc/xdg/menus/xfce-applications.menu which seems to
use /run/curreny-system/...

How can I do that xfce4-panel uses /run/current-system/sw/ as a prefix
instead of its own prefix?

Cheers,

-- 
Eduard Carreras i Nadal ecarre...@gmail.com
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-11 Thread Marc Weber
Excerpts from Eduard Carreras i Nadal's message of Fri Oct 12 00:42:55 +0200 
2012:
 How can I do that xfce4-panel uses /run/current-system/sw/ as a prefix
 instead of its own prefix?
look at the source code. Sometimes there are options, sometimes you have
to patch it.

Quicker way: Use a symlink:

ln -s $out-of-xfce/panel /var/run/panel

or the like

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-11 Thread Eduard Carreras i Nadal
On Fri, Oct 12, 2012 at 12:55 AM, Marc Weber marco-owe...@gmx.de wrote:

 Excerpts from Eduard Carreras i Nadal's message of Fri Oct 12 00:42:55
 +0200 2012:
  How can I do that xfce4-panel uses /run/current-system/sw/ as a prefix
  instead of its own prefix?
 look at the source code. Sometimes there are options, sometimes you have
 to patch it.


Making a patch[1] to xfce4-panel works fine, but seems ugly... I don't know
why $XDG_DATA_DIRS is empty. Can we do a wrapper in sh that export this
variable and then run xfce4-panel?

Maybe I'm saying a lot the nonsense...

Cheers,

[1]
https://github.com/ecarreras/nixpkgs/commit/aa4dc424596989d9ecac5047ea5126ec2a85cbf3

-- 
Eduard Carreras i Nadal ecarre...@gmail.com
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-11 Thread Eelco Dolstra
Hi,

On 11/10/12 19:32, Eelco Dolstra wrote:

 However, a much cleaner solution would be to make the panel use $XDG_DATA_DIRS
 for finding the *.desktop files of the plugins.  That would be more general
 because it would allow users to have their own plugins in their home 
 directories
 (so upstream might be willing to accept/implement something like this).  

Or maybe not, since Xfce apparently used to do this:

https://bugzilla.xfce.org/show_bug.cgi?id=5455

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-10 Thread Vladimír Čunát

Hello.

On 10/09/2012 03:32 PM, Eduard Carreras i Nadal wrote:

Hello,
I'm trying to add some goodies to xfce4 like panel plugins. I've done
the nix expression [1][2], then added to
pkgs/desktops/xfce-4.8/default.nix[3].

[...]



Then I tried to install this package with nix-env -i
/nix/store/gas9rjahhdxkksv7k3fbq4kwgp17xrvf-xfce4-cpufreq-plugin-1.0.0
but when I try to add the plugin there is not cpufreq plugin in the list
of xfce4 panel plugins.


The problem is the path that the panel uses to search for plugins. I'm 
quite sure it's compile-time configurable, but that would mean we need 
to recompile it whenever (re)installing plugins, which would be very 
uncomfortable.


The typical solution would be a wrapper that sets the path (like for 
firefox), perhaps via an environment variable. I don't know if 
xfce4-panel supports that, but it shouldn't be too difficult to patch 
it. According to [gtk] it might work by setting GTK_PATH.


Even better, maybe it would suffice to modify the desktop file entry 
X-XFCE-Module-Path or X-XFCE-Exec (see [xfce]).



Thanks for looking into it, it was also on my ever-growing ToDo list.


[xfce] http://wiki.xfce.org/dev/howto/panel_plugins
[gtk] http://developer.gnome.org/gtk/2.24/gtk-running.html


Vlada



smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Adding xfce4 panel plugins

2012-10-10 Thread Eduard Carreras i Nadal
On Wed, Oct 10, 2012 at 9:18 AM, Vladimír Čunát vcu...@gmail.com wrote:

 Hello.


 On 10/09/2012 03:32 PM, Eduard Carreras i Nadal wrote:

 Hello,
 I'm trying to add some goodies to xfce4 like panel plugins. I've done
 the nix expression [1][2], then added to
 pkgs/desktops/xfce-4.8/**default.nix[3].

 [...]

 

 Then I tried to install this package with nix-env -i
 /nix/store/**gas9rjahhdxkksv7k3fbq4kwgp17xr**
 vf-xfce4-cpufreq-plugin-1.0.0
 but when I try to add the plugin there is not cpufreq plugin in the list
 of xfce4 panel plugins.


 The problem is the path that the panel uses to search for plugins. I'm
 quite sure it's compile-time configurable, but that would mean we need to
 recompile it whenever (re)installing plugins, which would be very
 uncomfortable.

 The typical solution would be a wrapper that sets the path (like for
 firefox), perhaps via an environment variable. I don't know if xfce4-panel
 supports that, but it shouldn't be too difficult to patch it. According to
 [gtk] it might work by setting GTK_PATH.


Ok, I'll take a look to this and see how this go on.



 Even better, maybe it would suffice to modify the desktop file entry
 X-XFCE-Module-Path or X-XFCE-Exec (see [xfce]).


I've seen that X-XFCE-Module is used for internal plugins like windowmenu
plugin and X-XFCE-Exec is for external. The xfce4-cpufreq-plugin.desktop
has
a 
X-XFCE-Exec=/nix/store/gas9rjahhdxkksv7k3fbq4kwgp17xrvf-xfce4-cpufreq-plugin-1.0.0/libexec/xfce4/panel-plugins/xfce4-cpufreq-plugin.

Thanks for your comments.



 Thanks for looking into it, it was also on my ever-growing ToDo list.


 [xfce] 
 http://wiki.xfce.org/dev/**howto/panel_pluginshttp://wiki.xfce.org/dev/howto/panel_plugins
 [gtk] 
 http://developer.gnome.org/**gtk/2.24/gtk-running.htmlhttp://developer.gnome.org/gtk/2.24/gtk-running.html


 Vlada



-- 
Eduard Carreras i Nadal ecarre...@gmail.com
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Adding xfce4 panel plugins

2012-10-09 Thread Eduard Carreras i Nadal
Hello,
I'm trying to add some goodies to xfce4 like panel plugins. I've done the
nix expression [1][2], then added to pkgs/desktops/xfce-4.8/default.nix[3].

Looking to cpufreq plugin, this builds ok doing nix-build ~/nixos/nixpkgs
-A xfce.xfce4_cpufreq_plugin.

result build tree (I omited locale dir)
result/
├── libexec
│   └── xfce4
│   └── panel-plugins
│   └── xfce4-cpufreq-plugin
└── share
├── icons
│   └── hicolor
│   ├── 16x16
│   ├── 22x22
│   ├── 48x48
│   └── icon-theme.cache
└── xfce4
└── panel-plugins
└── xfce4-cpufreq-plugin.desktop

Then I tried to install this package with nix-env -i
/nix/store/gas9rjahhdxkksv7k3fbq4kwgp17xrvf-xfce4-cpufreq-plugin-1.0.0 but
when I try to add the plugin there is not cpufreq plugin in the list of
xfce4 panel plugins.

My ~/.nix-profile

.nix-profile/libexec
└── xfce4
└── panel-plugins
└── xfce4-cpufreq-plugin

.nix-profile/share/xfce4
└── panel-plugins
└── xfce4-cpufreq-plugin.desktop

The plugin seems that is in the right place, but xfce4 doesn't show it.

When installed with sytemPackages

ls -1 /var/run/current-system/sw/share/xfce4/panel-plugins/
thunar-tpa.desktop
xfce4-brightness-plugin.desktop
xfce4-cpufreq-plugin.desktop
xfce4-mixer-plugin.desktop
xfsm-logout-plugin.desktop

And anyone of this panel plugins are not in the list of available plugins.

I don't know what I missed or what I'm doing wrong.

Cheers


[1]
https://github.com/ecarreras/nixpkgs/blob/759f17d7d007fd63f0e4aaa74aef25f151b9de76/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-systemload-plugin.nix
[2]
https://github.com/ecarreras/nixpkgs/blob/759f17d7d007fd63f0e4aaa74aef25f151b9de76/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-cpufreq-plugin.nix
[3] https://github.com/ecarreras/nixpkgs/pull/1/files#L3R89

--
Eduard Carreras i Nadal ecarre...@gmail.com
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev