[Nix-dev] Best way to install nix packages from github repo

Kelong Cong kc04bc at gmx.com
Sat Jun 25 14:09:03 CEST 2016


I'm not too familiar with nix expression yet so using nix-env -f appears
to be the easiest approach at the moment.

Thanks for the suggestions!

On 25/06/16 13:41, zimbatm wrote:
> Or if you just want to install one package into your profile, clone
> nixpkgs and then run `nix-env -f . -iA something` where "something" is
> the attribute path of the package.
> 
> On Sat, 25 Jun 2016 at 12:01 Profpatsch <mail at profpatsch.de
> <mailto:mail at profpatsch.de>> wrote:
> 
>     On 16-06-25 12:25pm, Kelong Cong wrote:
>     > Hi Nix devs,
>     >
>     > If I see a package I want in the nixpkgs GitHub repo but it is not
>     > released yet, what's the best way to install it along side my current
>     > nix packages? I suppose you could download the .nix file, but is
>     there a
>     > better way?
> 
>     you can import a special nixpkgs with fetchFromGitHub
> 
>     (untested)
>     let
>       master-nixpgks = import (fetchFromGitHub {
>         owner = "nixos";
>         repo = "nixpkgs";
>         revision = "some git sha";
>         sha256 = "…";
>       }) {};
> 
>     >
>     > Furthermore, are there ways to keep it up to date? i.e. following the
>     > master branch for a particular package.
> 
>     Here you need to follow a channel. That is add the master channel
>     (not shure where to find it?!).
> 
>     nix-channel --add <path-to-master-channel> nixpkgs-master
> 
>     and then
>     let
>       master-nixpkgs = import <nixpkgs-master> {};
> 
>     alternatively you check out the repo, pull, and build with
> 
>     nix-build -I nixpkgs-master=/master/checkout …
> 
>     --
>     Proudly written in Mutt with Vim on NixOS.
>     Q: Why is this email five sentences or less?
>     A: http://five.sentenc.es
>     May take up to five days to read your message. If it’s urgent, call me.
>     _______________________________________________
>     nix-dev mailing list
>     nix-dev at lists.science.uu.nl <mailto:nix-dev at lists.science.uu.nl>
>     http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160625/41a4877b/attachment.sig>


More information about the nix-dev mailing list