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

Profpatsch mail at profpatsch.de
Sat Jun 25 13:01:44 CEST 2016

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

  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
  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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160625/c8c3968b/attachment.sig>

More information about the nix-dev mailing list