[Nix-dev] Best way to install nix packages from github repo
zimbatm
zimbatm at zimbatm.com
Sat Jun 25 13:41:34 CEST 2016
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> 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
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160625/12942eb2/attachment.html>
More information about the nix-dev
mailing list