[Nix-dev] Creating a Custom Channel (non-hydra one)

2014-10-08 Thread Michael R
 

Folks, 

How does one create a custom channel without a Hydra. Been
looking at nix-push, not sure yet. 

Scenario: 

1. Dev a package
2.
Push to channel 

Any instructions on making this happen? I'll be happy
to add them to nix-push docs once I get it working. 

-- michael 
 ___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Using selenium-server-standalone

2014-10-08 Thread Ganesh Sittampalam
Hi Corey,

Thanks a lot - it hadn't occurred to me to refer to it from a different 
nix expression.

Cheers,

Ganesh

On 07/10/2014 22:36, Corey O'Connor wrote:
> Hi Ganesh,
> This is the NixOS module I use:
>
> * https://github.com/coreyoconnor/nix_configs/blob/master/jenkins-node.nix
>
> This runs selenium server standalone under a Xvnc session. Plus opens
> the appropriate port for test clients. In particular, the selenium
> server systemd service is:
>
> *
> https://github.com/coreyoconnor/nix_configs/blob/master/jenkins-node.nix#L43
>
> There are some other attributes in that module that are not specific to
> running selenium server. Let me know if you have further questions.
>
> Cheers,
> Corey
>
> -Corey O'Connor
> coreyocon...@gmail.com 
> http://corebotllc.com/
>
> On Tue, Oct 7, 2014 at 1:58 PM, Ganesh Sittampalam  > wrote:
>
> Hi,
>
> The selenium-server-standalone nix package installs a jar, but
> doesn't seem to come with any way to actually find the installed jar.
>
> Is there something I'm missing, or should I just add a script to run
> it, like with selenium-remote-control?
>
> 
> https://github.com/NixOS/__nixpkgs/blob/master/pkgs/__development/tools/selenium/__remote-control/default.nix
> 
> 
>
> 
> https://github.com/NixOS/__nixpkgs/blob/master/pkgs/__development/tools/selenium/__server/default.nix
> 
> 
>
> Cheers,
>
> Ganesh
>
>

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Anyone care to review my post on the Nix expression language?

2014-10-08 Thread Wout Mertens
Hi James,

great reading, I learned a few things! (like that let is a recursive
definition, doh :) )

Nix does support the / operator, but it needs spaces or it will be
recognized as a path:
 $ nix-instantiate --eval --expr '4/3'
/Users/wmertens/4/3
 $ nix-instantiate --eval --expr '6 / 3'
2

https://github.com/NixOS/nix/blob/b6809608cc467925db44b1eb435095c37e433255/src/libexpr/parser.y#L347

Wout.

PS: (You know that the default-values example is still marked TODO, right?)



On Wed, Oct 8, 2014 at 11:31 AM, Ellis Whitehead 
wrote:

> Hi James.  For what it's worth: I haven't finished it yet, but I've
> enjoyed the reading so far.
>
> On Wed, Oct 8, 2014 at 12:21 AM, James Harrison Fisher
>  wrote:
> > Hi all,
> >
> > I’ve written up what turned out to be a quite extensive post on the Nix
> expression language:
> >
> > https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55
> >
> > I was hoping that someone with more knowledge than me could read it and
> comment on inaccuracies. I’m sure there will be some, since I’m learning
> while writing.
> >
> > Any and all comments appreciated!
> >
> > Best,
> >
> > James
> > ___
> > nix-dev mailing list
> > nix-dev@lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Anyone care to review my post on the Nix expression language?

2014-10-08 Thread Colin Putney
On Wed, Oct 8, 2014 at 5:00 AM, James Harrison Fisher <
jameshfis...@gmail.com> wrote:

> Thanks Ellis! If there’s anything you didn’t enjoy, I’d love to know,
> since I’ll be writing more of these and I want to establish a style that
> people like. :-)


Awesome article.  I especially liked the gory detail on how expression
trees are evaluated. I've been writing nix expressions for a few months and
already knew most of the material you covered, but that section really made
it clear how and why lazy evaluation works the way it does.

The only thing I didn't enjoy was the "I lied" motif. Especially after the
lazy-lists thing, it made me wonder if I could believe what I was a
reading. The general technique of over-simplifying and then introducing
layers of nuance is good, but I think you over-did it.

I'm really looking forward to the next article!

-Colin
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] library with python bindings

2014-10-08 Thread Damien Cassou
Hi,

On Wed, Oct 8, 2014 at 5:04 PM, Andreas Herrmann  wrote:
> How do I tell Nix to fix `PYTHONPATH` accordingly when this package is 
> loaded, and also to wrap python accordingly?

I think you have to use things like

wrapProgram "$out/bin/yourprogram" --prefix PYTHONPATH : ...

and

propagatedBuildInputs


Look at the existing derivations.


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] library with python bindings

2014-10-08 Thread Andreas Herrmann
Hi,

suppose I have a package that is mainly a C++ library and also written in C++ 
and built with CMake and GCC.
Yet, it also provides a python library that is compiled and written to 
`$out/lib/python2.7/site-packages/...` as a mix of shared object files and 
python scripts.

How do I tell Nix to fix `PYTHONPATH` accordingly when this package is loaded, 
and also to wrap python accordingly?
I looked around in nixpkgs but wasn't able to identify a certain pattern to 
follow in this case.

Best, 

Andreas
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] issue with channels and hydra

2014-10-08 Thread Andreas Herrmann
On Wednesday 08 October 2014 16:05:43 Eelco Dolstra wrote:
> On 08/10/14 13:17, Andreas Herrmann wrote:
> > Is there a way to make nix download from a not fully evaluated jobset?
> 
> You can use hydra.nixos.org as a binary cache server by passing the option
> 
>   --option extra-binary-caches http://hydra.nixos.org
> 
> But this should only be done as a last resort, because hydra.nixos.org is slow
> and overloaded already :-)
Thanks, Eelco, I'll keep that in mind.

Btw, I checked once more, and the unstable channel is now on 0b23b5b which has 
bash-4.2-p50 which actually works on my system.
So, for now I'm good. =)

Best,

Andreas
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] issue with channels and hydra

2014-10-08 Thread Eelco Dolstra
Hi,

On 08/10/14 13:17, Andreas Herrmann wrote:

>> The current channel version at http://nixos.org/channels/nixpkgs-unstable/
>> is b36095578cd4b12c976c95c18610ddb7d38dcf28, so if you use that, you should
>> get binaries.
> Hmm, that one still has the old bash 4.2 p49, which doesn't work for me,
> because my host system has newer patches and the corresponding environment
> crashes the nix bash [1]. I think I need at least p51. I'll try to get along
> with 14.04-small for now.
> 
> Is there a way to make nix download from a not fully evaluated jobset?

You can use hydra.nixos.org as a binary cache server by passing the option

  --option extra-binary-caches http://hydra.nixos.org

But this should only be done as a last resort, because hydra.nixos.org is slow
and overloaded already :-)

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Anyone care to review my post on the Nix expression language?

2014-10-08 Thread James Harrison Fisher
Thanks Ellis! If there’s anything you didn’t enjoy, I’d love to know, since 
I’ll be writing more of these and I want to establish a style that people like. 
:-)

On 8 Oct 2014, at 10:31, Ellis Whitehead  wrote:

> Hi James.  For what it's worth: I haven't finished it yet, but I've
> enjoyed the reading so far.
> 
> On Wed, Oct 8, 2014 at 12:21 AM, James Harrison Fisher
>  wrote:
>> Hi all,
>> 
>> I’ve written up what turned out to be a quite extensive post on the Nix 
>> expression language:
>> 
>>https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55
>> 
>> I was hoping that someone with more knowledge than me could read it and 
>> comment on inaccuracies. I’m sure there will be some, since I’m learning 
>> while writing.
>> 
>> Any and all comments appreciated!
>> 
>> Best,
>> 
>> James
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] issue with channels and hydra

2014-10-08 Thread Andreas Herrmann
On Wednesday 08 October 2014 11:43:57 Eelco Dolstra wrote:
> It hasn't finished building, and it hasn't been mirrored to cache.nixos.org 
> yet.
> That's why you're not getting binaries.
Ah, sorry, I didn't know that.

> The current channel version at http://nixos.org/channels/nixpkgs-unstable/ is
> b36095578cd4b12c976c95c18610ddb7d38dcf28, so if you use that, you should get
> binaries.
Hmm, that one still has the old bash 4.2 p49, which doesn't work for me, 
because my host system has newer patches and the corresponding environment 
crashes the nix bash [1]. I think I need at least p51. I'll try to get along 
with 14.04-small for now.

Is there a way to make nix download from a not fully evaluated jobset? I read 
somewhere on the wiki that you can, but it didn't say how.

[1]: http://pastebin.com/bARMTwq5
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Channel update knocks my box offline

2014-10-08 Thread robberer
Unfortunately, i know this problem: lost default gateway on rebuild. I
had an discussion on IRC with @wkennington about ip routing in NixOS .
See IRC logs from 20140901 12:11 . Maybe he is already working on a
overhauled routing system in NixOS.

On 10/07/2014 02:52 PM, Alexander Kjeldaas wrote:
> The command might be racey.  Maybe the default route is added before it is
> removed.
> 
> Alexander
> 

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] issue with channels and hydra

2014-10-08 Thread Eelco Dolstra
Hi,

On 08/10/14 11:29, Andreas Herrmann wrote:

> I have an issue with the nix-channel nixpkgs-unstable and hydra.
> For some reason nix refuses to download pre-built binaries and is insisting 
> on building them on my machine.
> 
> My nix-channel (updated just now with nix-channel --update):
> $ nix-channel --list
> nixpkgs http://nixos.org/channels/nixpkgs-unstable
> 
> My nixpkgs checkout (should be built according to 
> http://hydra.nixos.org/jobset/nixpkgs/trunk
> ):
> 4b072cfe08e3d6878ac5e6bdbbcdc37e8a70aec9

It hasn't finished building, and it hasn't been mirrored to cache.nixos.org yet.
That's why you're not getting binaries.

The current channel version at http://nixos.org/channels/nixpkgs-unstable/ is
b36095578cd4b12c976c95c18610ddb7d38dcf28, so if you use that, you should get
binaries.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Anyone care to review my post on the Nix expression language?

2014-10-08 Thread Ellis Whitehead
Hi James.  For what it's worth: I haven't finished it yet, but I've
enjoyed the reading so far.

On Wed, Oct 8, 2014 at 12:21 AM, James Harrison Fisher
 wrote:
> Hi all,
>
> I’ve written up what turned out to be a quite extensive post on the Nix 
> expression language:
>
> https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55
>
> I was hoping that someone with more knowledge than me could read it and 
> comment on inaccuracies. I’m sure there will be some, since I’m learning 
> while writing.
>
> Any and all comments appreciated!
>
> Best,
>
> James
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] issue with channels and hydra

2014-10-08 Thread Andreas Herrmann
Hi,

I have an issue with the nix-channel nixpkgs-unstable and hydra.
For some reason nix refuses to download pre-built binaries and is insisting on 
building them on my machine.

My nix-channel (updated just now with nix-channel --update):
$ nix-channel --list
nixpkgs http://nixos.org/channels/nixpkgs-unstable

My nixpkgs checkout (should be built according to 
http://hydra.nixos.org/jobset/nixpkgs/trunk
):
4b072cfe08e3d6878ac5e6bdbbcdc37e8a70aec9

If I try to install, say, bash then nix will try to build all dependencies:
$ nix-env -f ~/src/nixpkgs -i bash-4.2-p51
installing `bash-4.2-p51'
these derivations will be built:
  /nix/store/20ja0jyiakc5h339s6lmibk6k42iiiab-binutils-2.23.1.drv
  /nix/store/2v03llk9fi1asqfjdyxii12lw3fczmic-xz-5.0.5.drv
  /nix/store/41cp57y3w4ln2iabzl5s8hs3nxxcybi8-paxctl-0.9.drv
  /nix/store/4sraykqxjwrfdzf64nppnipibvm2bf4q-bash-4.2-p51.drv
  /nix/store/fxnqglkrp9pf5j0v9z20z6rah1yhjbnx-bootstrap-gcc-wrapper.drv
  /nix/store/jq8rr4l13h6hqvmvlm3612mzlc6m8hgc-perl-5.16.3.drv
  /nix/store/jw6jplma6ma69j0higks5wvrrg8jcjh7-zlib-1.2.8.drv
  /nix/store/p45rhz527blr93n6g9qnz651r54gkna3-gcc-wrapper-4.8.3.drv
  /nix/store/qh45v8qb13rfv777ra9jgnlcrcmzq6zi-stdenv-linux-boot.drv
  /nix/store/vyqjwy9cnbgszhpakxa0dr0yyx4h1c2p-bison-3.0.2.drv
  /nix/store/xmjkivsb2js3wj3w1ychh218i0knb7hg-stdenv-linux-boot.drv
  /nix/store/z24hjprxvdw93zivagpi7d54vv3ms0f3-gnum4-1.4.17.drv
building path(s) `/nix/store/2s4yabqxbbswyrk750s1gdjwn258ivwv-perl-5.16.3'

What am I doing wrong? Why isn't nix using the pre-built packages on hydra?

Best,

Andreas
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Anyone care to review my post on the Nix expression language?

2014-10-08 Thread James Harrison Fisher
Thanks for looking Luca! And a good point; Debug.trace is a better analogy.

On 7 Oct 2014, at 23:33, Luca Bruno  wrote:

> Length and nice, thanks. Only had a quick look. Note that haskell has 
> Debug.trace.
> 
> On Wed, Oct 8, 2014 at 12:21 AM, James Harrison Fisher 
>  wrote:
> Hi all,
> 
> I’ve written up what turned out to be a quite extensive post on the Nix 
> expression language:
> 
> https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55
> 
> I was hoping that someone with more knowledge than me could read it and 
> comment on inaccuracies. I’m sure there will be some, since I’m learning 
> while writing.
> 
> Any and all comments appreciated!
> 
> Best,
> 
> James
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 
> 
> 
> -- 
> www.debian.org - The Universal Operating System

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev