[Nix-dev] Managing private Nix packages outside the Nixpkgs tree

Matthias Beyer mail at beyermatthias.de
Sat Jan 17 00:01:22 CET 2015


Hi nixos-ML,

So, I tried to ask Sander van de Burg soem questions which are related
to one blog article of him, but unfortunately my mail server bounced
the mail back to me, telling me that his mail address is not valid.

So, I'm posting the email here, hopefully I can get an answer on the
topic from you guys:

On 16-01-2015 23:52:36, Matthias Beyer wrote:
> Hi Sander,
> 
> I have a question which could be or is related to the problem you
> solved in your blog post about managing private nix packages outside
> of the nixpkgs tree.
> 
> My Problem is that I want to build a package out of vim_configurable
> and a set of vim plugins I specify myself and install the whole
> package as system package. So basically, it should look like this in
> my configuration.nix:
> 
>     systemPackages = [ ... myVimPackage ... ];
> 
> I tried to follow the configuration here[0], but I'm completely lost
> and I don't understand most of it.
> 
> I specified my vim plugin packages like aszlig did here[1], but
> returing only a set of plugin packages at the end, no vimrc (which I
> want to out-source into another package, for modularity).
> 
> My overall setup for my configuration looks like this:
> 
>     ~/config/nixos/                 # dir with _all_ nixos confs
>         ./base-configuration.nix    # default shell, bootloaded, etc
>         ./nox.nix                   # Machine "nox"
>         ./pkgs/                     # Dir, holding package lists
>             ./basePackages.nix      # whereas each of these returns an
>             ./desktopPackages.nix   # array or packages
>             ./developPackages.nix
>         ./services                  # Dir, holding service definitions
>             ./redshift.nix
>             ./x.nix
> 
> My `nox.nix` looks basically like this:
> 
>     { config, pkgs, ... }:
> 
>     let
>       configDir = /home/m/config/nixos;
>     in
> 
>     {
>       imports = [
>         # Base configuration
>         "${configDir}/base-configuration.nix"
> 
>         # Users
>         "${configDir}/users/m.nix"
> 
>         # Services
>         "${configDir}/services/x.i3.nix"
>         "${configDir}/services/redshift.nix"
>       ];
> 
>       # Define on which hard drive you want to install Grub.
>       boot.loader.grub.device = "/dev/sda";
> 
>       networking.hostName = "nox";
> 
>       environment.systemPackages = let
>         basePkgs    = import "${configDir}/pkgs/basePackages.nix" pkgs;
>         devPkgs     = import "${configDir}/pkgs/devPackages.nix" pkgs;
>         desktopPkgs = import "${configDir}/pkgs/desktopPackages.nix" pkgs;
>       in
>         basePkgs ++ devPkgs ++ desktopPkgs;
> 
>     }
> 
> And I would like to put my vim package into basePackages.nix:
> 
> 
>     pkgs: [
>       pkgs.acpitool
>       pkgs.coreutils
>       pkgs.mosh
>       # here goes my vim package
>       # ...
>     ]
> 
> ---
> 
> So, in your blog post[2], you described how to maintain packages
> outside of the nixos package tree, which is what I want, I guess.
> 
> How to approach this?
> 
> Is this even the right approach for the problem? Or am I heading
> for the wrong way?
> 
> The second part of the question would be how to write a package which
> defines the vimrc file, as aszlig does here[3]? Is this even
> feasible?
> 
> I hope you can help me with my problem(s) and teach me how to do
> things right!
> 
> I'd love to say "See you at FOSDEM, then", but unfortunately my exams
> are exactly around this weekend, so I can not participate! :-(
> I hope there will be a nixos spring nearby my home some time, thought.
> 
> [0]: https://github.com/aszlig/vuizvui
> [1]: https://github.com/aszlig/vuizvui/blob/3e9771d4dce455fd68c8cadcbff6ba695625c372/pkgs/vim/default.nix#L5
> [2]: http://sandervanderburg.blogspot.de/2014/07/managing-private-nix-packages-outside.html
> [3]: https://github.com/aszlig/vuizvui/blob/master/pkgs/vim/default.nix#L236
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150117/f5071e21/attachment.bin 


More information about the nix-dev mailing list