[Nix-dev] Trying to fix bzr-tools-1.5 package...
Bárður Árantsson
spam at scientician.net
Thu Jun 26 08:51:47 CEST 2008
Hi all,
I'm trying to fix the bzr-tools-1.5 package, but I've run into a bit of
a snag which I need some help with.
First of all: the reason that the current bzr-tools package doesn't work
is that it just dumps everything into /usr/share/bzrtools (or some
such) where bazaar won't ever find it -- it don't think it even
"precompiles" the py files.
So, I've tried to fix it, by changing the Nix expression to:
args : with args;
if ! bazaar.python.readlineSupport then
throw "Bazaar Tools require readline support in python."
else
rec {
src = fetchurl { ... };
buildInputs = [python];
configureFlags = [];
phaseNames = [ "installPythonPackage" ];
name = "bzr-tools-1.5";
meta = {
description = "Bazaar plugins.";
};
}
(I've omitted the fetchurl for readability -- it's the same as in the
original.)
This seems to work in that it properly installs everything into
/lib/python2.5/bzrlib/plugins
which is where Bazaar normally reads its plugins from.
The only problem now is that the "bzr" wrapper executable installed by
the "bazaar" package looks like this:
#! /nix/store/vdzbaimmqgnzbv41jlz04h0pfwxi9vc6-bash-3.2-p39/bin/sh -e
export
PYTHONPATH=/nix/store/z58bxgvijyc8v7zc6rzfcbm0dz14s5r5-bazaar-1.5/lib/python2.5/site-packages${PYTHONPATH:+:}$PYTHONPATH
exec
"/nix/store/z58bxgvijyc8v7zc6rzfcbm0dz14s5r5-bazaar-1.5/bin/.wrapped-bzr"
"$@"
Of course, this means that it won't find the bzrtools plugin since the
plugin is located in a different store directory.
Does anyone have any clues as to how I can get Bazaar to "see" the
bzrtools directory?
In case it helps, Bazaar also honours an environment variable called
BZR_PLUGIN_PATH (works identically to PATH, i.e. uses a ':' separator).
Of course I could just set that in my user session, but it's
unsatisfactory that the package doesn't do this automatically.
I suppose another alternative would be to make bzrtools an 'option' of
the bazaar package to force it to install into the same store directory
as bazaar, but that also seems unsatisfactory.
Any help much appreciated.
Cheers,
--
Bardur Arantsson
<bardurREMOVE at THISscientician.net>
- There are a thousand forms of subversion, all of them
interesting. But few, in my opinion, can equal the convenience
and immediacy of the cream pie.
Noël Godin
More information about the nix-dev
mailing list