[Nix-dev] git svn and how to install it please?

Tony White tonywhite100 at googlemail.com
Thu Jun 11 04:23:15 CEST 2009


2009/6/10 Lluís Batlle <viriketo at gmail.com>:
> Additionally to the nixos config, there is the nixpkgs config.
> Usually it's at $HOME/.nixpkgs/config.nix
>
> the beginning of top-packages.nix has the config management.
>
> the file config.nix should have attributes set like this, as a quick guide:
> {
>   git = {
>       svnSupport = true;
>   };
> }
>
> The evaluation of any other nixpkgs expression will take into account
> your config.nix file.
> You will see in top-packages.nix that you can override the path of the
> nixpkgs config file with the environment variable NIXPKGS_CONFIG.
>
> Regards,
> Lluís.
>
> 2009/6/10 Tony White <tonywhite100 at googlemail.com>:
>> Hi,
>> I'd like to use git svn which is a perl module, it's specified in
>> /etc/nixos/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix,
>> however I can't see how to install it.
>> I've got :
>>
>>          environment = {
>>          extraPackages = [
>>          pkgs.git
>>          ];  };
>>
>> In configuration.nix and git is there and I can use it from a konsole,
>> however if I try to use git svn in a konsole, it complains about it
>> the missing perl module.
>>
>> Can't locate SVN/Core.pm in @INC
>>
>> I can see :
>>
>> svnSupport = getConfig ["git" "svnSupport"] false; # for git-svn support
>>
>> in /etc/nixos/nixpkgs/pkgs/applications/version-management/git-and-tools
>> but how do I specify to install it or have I found a problem?
>>
>> My first thought was that it was something like :
>>
>>          pkgs.git.svnSupport
>>
>> That's obviously wrong though.
>>
>> Thanks,
>> Tony
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at cs.uu.nl
>> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>>
>

Hi Luis and Marc,
Thanks for the info Lluís, unfortunately I've not been able to
activate the svnSupport switch yet.

Because I want it system wide, I found :

export NIXPKGS_CONFIG=/nix/etc/config.nix

in /etc/nixos/nixos/etc/bashrc.sh

/nix/etc/config.nix did not exist, so I created it and added :

{
  git = {
      svnSupport = true;
  };
}

to it and then used a sudo nixos-rebuild switch.
Nothing changed and the error when trying to use git svn still occurs.

Marc, the problem is that there are two ways to call git svn either :

git svn
or
git-svn

If they are two different things, I do not know. I do know that git
svn (No dash) Is how you call the git-svn executable according to the
documentation.

So git-svn or git-svn --help results in the message you have quoted
(Even after it has been set to true) :

git-svn not supported, reinstall with config git = { svnSupport = true } set

but git svn --help opens the git-svn manpage in vi and just git svn results in :

Can't locate SVN/Core.pm in @INC (@INC contains:
/nix/store/fi89ps92826jr4mc6p904l1jyslf7kch-git-1.6.1.3/lib/perl5/site_perl/5.10.0/i686-linux-thread-multi
/nix/store/fi89ps92826jr4mc6p904l1jyslf7kch-git-1.6.1.3/lib/perl5/site_perl/5.10.0
/nix/var/nix/profiles/per-user/tony/profile/lib/perl5/site_perl
/nix/var/nix/profiles/per-user/tony/profile/lib/site_perl
/nix/var/nix/profiles/default/lib/perl5/site_perl
/nix/var/nix/profiles/default/lib/site_perl
/nix/store/d9k73hs12g1ihbs1312fdhq2p0caxf14-perl-5.10.0/lib/perl5/5.10.0/i686-linux-thread-multi
/nix/store/d9k73hs12g1ihbs1312fdhq2p0caxf14-perl-5.10.0/lib/perl5/5.10.0
/nix/store/d9k73hs12g1ihbs1312fdhq2p0caxf14-perl-5.10.0/lib/perl5/site_perl/5.10.0/i686-linux-thread-multi
/nix/store/d9k73hs12g1ihbs1312fdhq2p0caxf14-perl-5.10.0/lib/perl5/site_perl/5.10.0
.) at /nix/store/fi89ps92826jr4mc6p904l1jyslf7kch-git-1.6.1.3/libexec/git-core//git-svn
line 29.

I hope this info helps, there's obviously something a little odd
happening or maybe I don't understand. If I could understand the
expression a little bit better, I would re-write it to just be able to
use pkgs.git.svnSupport in configuration.nix, or even just make it
default, seeing as it is part of git.

I can't really be sure what to try now other than write a new git
expression here, the git expressions are a little too complex for me
to understand yet.

Thanks,
Tony



More information about the nix-dev mailing list