Re: [Nix-dev] Redesign of documentation

2016-02-16 Thread stewart mackenzie
I can't find the link, but a few nixers made something called nix-cloud.
That was fun and informative for learning the nix expression language.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] codetriage.com

2016-02-16 Thread Rok Garbas
i've signed up as well. looks interesting to load balance the issue
delegation work automatically.

On Tue, Feb 16, 2016 at 11:48 PM, Jakob Gillich  wrote:
> Interesting, that looks like a good way to reduce the amount of open
> issues. I've signed up.
>
> On Tue, Feb 16, 2016, at 11:43 PM, Profpatsch wrote:
>> I just created a Repo page for nixpkgs at codetriage.com.
>>
>> It is a simple site that sends you 1 open issue each day once
>> you sign up with your Github account.
>>
>> Maybe a few people want to join me.
>>
>> --
>> 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@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



-- 
Rok Garbas
http://www.garbas.si
r...@garbas.si
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] codetriage.com

2016-02-16 Thread Jakob Gillich
Interesting, that looks like a good way to reduce the amount of open
issues. I've signed up.

On Tue, Feb 16, 2016, at 11:43 PM, Profpatsch wrote:
> I just created a Repo page for nixpkgs at codetriage.com.
> 
> It is a simple site that sends you 1 open issue each day once
> you sign up with your Github account.
> 
> Maybe a few people want to join me.
> 
> -- 
> 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@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] codetriage.com

2016-02-16 Thread Profpatsch
I just created a Repo page for nixpkgs at codetriage.com.

It is a simple site that sends you 1 open issue each day once
you sign up with your Github account.

Maybe a few people want to join me.

-- 
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@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread Shea Levy
On 2016-02-16 14:25, Kosyrev Serge wrote:
> rocon...@theorem.ca writes:
>> I am using the following expression which I believe will build a 
>> patched
>> version of glibc locally, and then build a patched NixOS derivation.
>>
>> system.replaceRuntimeDependencies = with pkgs.lib;
>>   [{original = pkgs.glibc; replacement = 
>> pkgs.stdenv.lib.overrideDerivation pkgs.glibc (oldAttr: { patches = 
>> oldAttr.patches ++
>> [(pkgs.fetchurl { url = 
>> "https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/glibc/cve-2015-7547.patch";;
>>   sha256 = 
>> "0awpc4rp2x27rjpj83ps0rclmn73hsgfv2xxk18k82w4hdxqpp5r";})];
>>});}
>>   ];
>>
>> I didin't time it, but I think it took around 25 minutes to update 
>> my
>> desktop machine this way.  Good luck everyone.
>
> For those of us who aren't that fluent in Nix idioms -- could you
> provide a quick summary of how you manage to achieve the seemingly
> impossible?
>
> Normally, one would expect that updating glibc would cause a full 
> system
> rebuild, but in your case it's obviously not the case.
>
> And lastly -- is this somehow related to the techniques proposed for
> providing NixOS with security updates?

system.replaceRuntimeDependencies under the hood uses 
pkgs.replaceDependency, you can read details at 
https://github.com/NixOS/nixpkgs/blob/ef3757db635bc361be81049eaaa4b4d3bfd0785d/pkgs/build-support/replace-dependency.nix
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread roconnor
On Tue, 16 Feb 2016, Kosyrev Serge wrote:

> rocon...@theorem.ca writes:
>> I am using the following expression which I believe will build a patched
>> version of glibc locally, and then build a patched NixOS derivation.
>>
>> system.replaceRuntimeDependencies = with pkgs.lib;
>>   [{original = pkgs.glibc; replacement = 
>> pkgs.stdenv.lib.overrideDerivation pkgs.glibc (oldAttr: { patches = 
>> oldAttr.patches ++
>> [(pkgs.fetchurl { url = 
>> "https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/glibc/cve-2015-7547.patch";;
>>   sha256 = 
>> "0awpc4rp2x27rjpj83ps0rclmn73hsgfv2xxk18k82w4hdxqpp5r";})];
>>});}
>>   ];
>>
>> I didin't time it, but I think it took around 25 minutes to update my
>> desktop machine this way.  Good luck everyone.
>
> For those of us who aren't that fluent in Nix idioms -- could you
> provide a quick summary of how you manage to achieve the seemingly
> impossible?
>
> Normally, one would expect that updating glibc would cause a full system
> rebuild, but in your case it's obviously not the case.

I'll try my best to explain.  If you are familiar with how you update a 
tree structure in functional programming, the techinque is similar to 
that.  To update a leaf in a tree you trace a path from the root of the 
tree to the leaf, call this path a spine.  You can build a new copy of the 
tree by updating all the nodes along this spine including replacing the 
leaf with your updated leaf. The result is a root of a new tree where 
unchanged branches are shared with the old tree.

In this case the root is what is built by nixos-rebuild and the tree is 
the tree of dependencies, and glibc is a leaf that needs to be replaced.

Step 1) is to build the orginial unpatch derivation for the system. 
Usually this is the currently running system, so no work needs to be done, 
but in principle if you are making other changes to your configuraiton.nix 
the unpatched system needs to be built.

Step 2) Build the patched glibc.  This is done the normal way.

Step 3) List all the packages that are run-time dependecies of the 
unpatched system and pick out all those packages that either depend, 
directly or indirectly on the unpatched glibc.

Step 4) for each of those packages make a new derivation whose source is 
the output of the deriviation, and which runs a command that finds all the 
hashes that are in that list generated by Step 3 and replaced them with 
new hashes that are being generated in by Step 4.  (Clearly this step is 
preformed recursively starting at those packaged who directly depend on 
glibc and then working up to those packages that depended on packages that 
depend on glibc, etc.)

Step 5) Return the new derivation that is has replaced the hashes in the 
unpatched root.

Things to note:

(1) There is nothing impure going on.  The existing store values are never 
mutated.

(2) This only updates packages that have a runtime depenency on glibc. 
Anything that statically links glibc (ie. only has a build-time depenency 
on glibc) are not updated.

> And lastly -- is this somehow related to the techniques proposed for
> providing NixOS with security updates?

I wasn't at the last Nix meeting, so I'm not sure if it is related or not. 
I hope it is.

-- 
Russell O'Connor  
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] loading the nix-shell in a jenkins job

2016-02-16 Thread zimbatm
Okay, maybe it's the environment variables or how the script is invoked

On Tue, 16 Feb 2016 at 17:57 Allan Espinosa  wrote:

> Hi,
>
> I was actually able to make it work with what I posted earlier.  Here
> is the full script in the gist:
> https://gist.github.com/aespinosa/96ea991e0a938aaee109
>
> I tried your wrapper and I get the same "undefined variable ‘jupyter’
> ..." error. However, running it on the console works manually works.
>
> On Tue, Feb 16, 2016 at 11:32 AM, zimbatm  wrote:
> > Sorry I meant your wrapper would look like this:
> >
> >   #!/bin/sh
> >   cat | ./your-script
> >
> > Can you also gist or make attach an exact copy of your script to make
> sure
> > things like whitespaces are not an issue ?
> >
> > On Tue, 16 Feb 2016 at 15:32 Allan Espinosa  wrote:
> >>
> >> Hi Jonas,
> >>
> >> Thanks for the tip.  I couldn't do what you said in Jenkins itself so
> >> I had to wrap nix-shell inside another shell wrapper:
> >>
> >> wrapper.sh:
> >> #!/bin/bash
> >>
> >> cat $1 | exec nix-shell
> >>
> >> Then i had my Jenkins job as follows:
> >> #!/path/to/wrapper.sh
> >> #!nix-shell -i bash
> >>
> >> jupyter --version
> >>
> >> Hope somebody else finds this useful.
> >>
> >> Regards,
> >> Allan
> >>
> >> On Tue, Feb 16, 2016 at 8:49 AM, zimbatm  wrote:
> >> > It looks legit.
> >> >
> >> > Something I noticed is that nix-shell still drops me in a shell if it
> >> > thinks
> >> > that the input is interactive.
> >> >
> >> > Can you try to run the same command but with `cat | ` piped in front ?
> >> >
> >> > On Tue, 16 Feb 2016 at 02:06 Allan Espinosa 
> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I've been trying to get one of my default.nix development environment
> >> >> build in a Jenkins job. I'm not trying to make a package but create a
> >> >> different artifact that will be consumed in a different way.
> >> >>
> >> >> I have this in my execute build step in a freestyle job:
> >> >>
> >> >> ```
> >> >> #!/usr/bin/env nix-shell
> >> >> #!nix-shell -i bash
> >> >>
> >> >> jupyter --version
> >> >> ```
> >> >>
> >> >> However, I am getting this output:
> >> >>
> >> >> ```
> >> >> [workspace] $ /usr/bin/env nix-shell
> >> >>
> >> >>
> >> >>
> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh
> >> >> error: undefined variable ‘jupyter’ at
> >> >>
> >> >>
> >> >>
> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh:4:1
> >> >> ```
> >> >>
> >> >> From the output above, it looks like my script is being interpreted
> as
> >> >> a nix expression instead.
> >> >>
> >> >> Has anyone else have experience loading the nix-shell in a Jenkins
> job?
> >> >>
> >> >> Thanks
> >> >> Allan
> >> >> ___
> >> >> 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] Git + gettextWithExpat incompatibility

2016-02-16 Thread zimbatm
Can you create an issue ?

I can reproduce the issue on master. If just `nixos.gettext` is installed
it works fine.
I also tried changing the EDITOR but that's not it.
Note that git-rebase is implemented in bash

On Tue, 16 Feb 2016 at 18:23 Mikhail  wrote:

> Hi!
>
> I've discovered an interesting bug. Here's how it's possible to
> reproduce it:
>
> 1. Install both `gettextWithExpat` and `git` package using nix-env or
> declaration in `configuration.nix`. I've tried different git versions,
> all them work this way. Not sure about `gettextWithExpat` versions, but
> I'm using 0.19.6 with `nixos-unstable` channel on my system.
> 2. cd into any git repository directory
> 3. Run `git rebase` or `git stash` with any arguments (except options,
> `--help` works well). Git will do nothing and return code 0.
>
> Here's an illustration of how it works:
> ```
> [volhovm@avishai:~/code]$ mkdir testGit
> [volhovm@avishai:~/code]$ cd testGit/
> [volhovm@avishai:~/code/testGit]$ git init
> Initialized empty Git repository in /home/volhovm/code/testGit/.git/
> [volhovm@avishai:~/code/testGit]$ nix-env -q
> gettext-expat-gettext-0.19.6
> git-minimal-2.7.0
> #other stuff
> [volhovm@avishai:~/code/testGit]$ git rebase asoehuasnotuehsoathueao
> [volhovm@avishai:~/code/testGit]$ echo $?
> 0
> [volhovm@avishai:~/code/testGit]$ git stash asoehuasnoteu
> [volhovm@avishai:~/code/testGit]$ echo $?
> 0
> [volhovm@avishai:~/code/testGit]$ nix-env -e gettext-expat-gettext
> uninstalling ‘gettext-expat-gettext-0.19.6’
> [volhovm@avishai:~/code/testGit]$ git rebase aoeuaoeuaoe
> fatal: Needed a single revision
> invalid upstream aoeuaoeuaoe
> [volhovm@avishai:~/code/testGit]$ echo $?
> 1
> [volhovm@avishai:~/code/testGit]$ git stash aoeuaoeuaeo
> usage: git stash list []
>or: git stash show []
>or: git stash drop [-q|--quiet] []
>or: git stash ( pop | apply ) [--index] [-q|--quiet] []
>or: git stash branch  []
>or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
>[-u|--include-untracked] [-a|--all] []]
>or: git stash clear
> [volhovm@avishai:~/code/testGit]$ echo $?
> 1
> ```
>
> I used strace to discover what's going on and it appeared that `git
> rebase aoeuaoeuaoeu` with and without `gettextWithExpat` installed gives
> almost identical output (differs in addresses only), except for the last
> ~6 lines, which are:
>
> With `gettextExpat` installed:
> ```
> read(4, "", 1)  = 0
> close(4)= 0
> wait4(13438, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13438
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13438,
> si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
> exit_group(0)   = ?
> +++ exited with 0 +++
> ```
>
> Without:
> ```
> read(4, "", 1)  = 0
> close(4)= 0
> wait4(13271, fatal: Needed a single revision
> invalid upstream aoeuaoeu
> [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 13271
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13271,
> si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
> exit_group(1)   = ?
> +++ exited with 1 +++
> ```
>
> I wonder if this issue is related to nixOS or git. What are your
> thoughts about it?
>
> --
> Volkhov Mikhail
> M3#38 IFMO study group 17'
> Computer Technologies Department
> ___
> 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] Packaging Torch

2016-02-16 Thread Jonn Mostovoy
I just want to point out that I wanted to build a neural network engine in
lua with some auxiliary dependencies and faced unpleasant problems with
'cc' binary pointing not where the author's cmake file expected to point.
Didn't research, much, but if anything, I'd be interested to contribute to
little things when it comes to lua packaging.
On Feb 16, 2016 7:06 PM, "William Casarin"  wrote:

> On Tue, Feb 16, 2016 at 5:30 AM, Sergey Mironov  wrote:
> > Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it
> > looks like I have to package it first.
>
> I was looking into this awhile back. On the lua side, some pre-reqs
> would make this a lot easier:
>
>   * luarocks2nix (https://luarocks.org/manifest.zip)
>   * packaging these https://github.com/torch/rocks
>
> This would be useful for things outside Torch as well, but looks like
> a lot of work...
> ___
> 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] Git + gettextWithExpat incompatibility

2016-02-16 Thread Mikhail
Hi!

I've discovered an interesting bug. Here's how it's possible to
reproduce it:

1. Install both `gettextWithExpat` and `git` package using nix-env or
declaration in `configuration.nix`. I've tried different git versions,
all them work this way. Not sure about `gettextWithExpat` versions, but
I'm using 0.19.6 with `nixos-unstable` channel on my system.
2. cd into any git repository directory
3. Run `git rebase` or `git stash` with any arguments (except options,
`--help` works well). Git will do nothing and return code 0.

Here's an illustration of how it works:
```
[volhovm@avishai:~/code]$ mkdir testGit
[volhovm@avishai:~/code]$ cd testGit/
[volhovm@avishai:~/code/testGit]$ git init
Initialized empty Git repository in /home/volhovm/code/testGit/.git/
[volhovm@avishai:~/code/testGit]$ nix-env -q
gettext-expat-gettext-0.19.6
git-minimal-2.7.0
#other stuff
[volhovm@avishai:~/code/testGit]$ git rebase asoehuasnotuehsoathueao
[volhovm@avishai:~/code/testGit]$ echo $?
0
[volhovm@avishai:~/code/testGit]$ git stash asoehuasnoteu
[volhovm@avishai:~/code/testGit]$ echo $?
0
[volhovm@avishai:~/code/testGit]$ nix-env -e gettext-expat-gettext
uninstalling ‘gettext-expat-gettext-0.19.6’
[volhovm@avishai:~/code/testGit]$ git rebase aoeuaoeuaoe
fatal: Needed a single revision
invalid upstream aoeuaoeuaoe
[volhovm@avishai:~/code/testGit]$ echo $?
1
[volhovm@avishai:~/code/testGit]$ git stash aoeuaoeuaeo
usage: git stash list []
   or: git stash show []
   or: git stash drop [-q|--quiet] []
   or: git stash ( pop | apply ) [--index] [-q|--quiet] []
   or: git stash branch  []
   or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
   [-u|--include-untracked] [-a|--all] []]
   or: git stash clear
[volhovm@avishai:~/code/testGit]$ echo $?
1
```

I used strace to discover what's going on and it appeared that `git
rebase aoeuaoeuaoeu` with and without `gettextWithExpat` installed gives
almost identical output (differs in addresses only), except for the last
~6 lines, which are:

With `gettextExpat` installed:
```
read(4, "", 1)  = 0
close(4)= 0
wait4(13438, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13438
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13438,
si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
exit_group(0)   = ?
+++ exited with 0 +++
```

Without:
```
read(4, "", 1)  = 0
close(4)= 0
wait4(13271, fatal: Needed a single revision
invalid upstream aoeuaoeu
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 13271
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13271,
si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
exit_group(1)   = ?
+++ exited with 1 +++
```

I wonder if this issue is related to nixOS or git. What are your
thoughts about it?

-- 
Volkhov Mikhail
M3#38 IFMO study group 17'
Computer Technologies Department
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Packaging Torch

2016-02-16 Thread William Casarin
On Tue, Feb 16, 2016 at 5:30 AM, Sergey Mironov  wrote:
> Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it
> looks like I have to package it first.

I was looking into this awhile back. On the lua side, some pre-reqs
would make this a lot easier:

  * luarocks2nix (https://luarocks.org/manifest.zip)
  * packaging these https://github.com/torch/rocks

This would be useful for things outside Torch as well, but looks like
a lot of work...
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Haskell Infrastructure - Nix-Shell with Hoogle from cabal2nix

2016-02-16 Thread William Casarin
Hey Andreas,

On Tue, Feb 16, 2016 at 1:57 AM, Andreas Herrmann  wrote:
> In any case, the question about a Hoogle database remains. I find it very 
> useful in situations where I don't have a reliable Internet connection at 
> hand. (train/plane/etc.)

wrt. the hoogle question, there's a bunch of solutions written up here:

http://stackoverflow.com/questions/27728838/using-hoogle-in-a-haskell-development-environment-on-nix

The one I use is my answer, a large nix-shell with all of the
libraries I would ever use. The second answer is project-local hoogle
db, which I personally wouldn't find that useful.

I even have a systemd service which runs the hoogle database here:

https://github.com/jb55/nix-files/blob/8a47989a1091910fdba202f7def235ddcca6b726/services/hoogle/default.nix

Which I plan on adding to nixpkgs soon.

> To avoid any collisions I've developed a habit of keeping as many things as 
> possible in separate nix-shells rather than in my user profile

The way I do this is create a custom environment for my haskell tools like so:

https://github.com/jb55/nix-files/blob/8a47989a1091910fdba202f7def235ddcca6b726/nixpkgs/config.nix#L62-L77

and

https://github.com/jb55/nix-files/blob/8a47989a1091910fdba202f7def235ddcca6b726/nixpkgs/config.nix#L43-L46

Then I can just nix-env -i haskellTools to put it in my path, and
nix-env -e haskellTools to
remove it from my path when I'm done. You could even automate this
with a script.

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


Re: [Nix-dev] loading the nix-shell in a jenkins job

2016-02-16 Thread Allan Espinosa
Hi,

I was actually able to make it work with what I posted earlier.  Here
is the full script in the gist:
https://gist.github.com/aespinosa/96ea991e0a938aaee109

I tried your wrapper and I get the same "undefined variable ‘jupyter’
..." error. However, running it on the console works manually works.

On Tue, Feb 16, 2016 at 11:32 AM, zimbatm  wrote:
> Sorry I meant your wrapper would look like this:
>
>   #!/bin/sh
>   cat | ./your-script
>
> Can you also gist or make attach an exact copy of your script to make sure
> things like whitespaces are not an issue ?
>
> On Tue, 16 Feb 2016 at 15:32 Allan Espinosa  wrote:
>>
>> Hi Jonas,
>>
>> Thanks for the tip.  I couldn't do what you said in Jenkins itself so
>> I had to wrap nix-shell inside another shell wrapper:
>>
>> wrapper.sh:
>> #!/bin/bash
>>
>> cat $1 | exec nix-shell
>>
>> Then i had my Jenkins job as follows:
>> #!/path/to/wrapper.sh
>> #!nix-shell -i bash
>>
>> jupyter --version
>>
>> Hope somebody else finds this useful.
>>
>> Regards,
>> Allan
>>
>> On Tue, Feb 16, 2016 at 8:49 AM, zimbatm  wrote:
>> > It looks legit.
>> >
>> > Something I noticed is that nix-shell still drops me in a shell if it
>> > thinks
>> > that the input is interactive.
>> >
>> > Can you try to run the same command but with `cat | ` piped in front ?
>> >
>> > On Tue, 16 Feb 2016 at 02:06 Allan Espinosa  wrote:
>> >>
>> >> Hi,
>> >>
>> >> I've been trying to get one of my default.nix development environment
>> >> build in a Jenkins job. I'm not trying to make a package but create a
>> >> different artifact that will be consumed in a different way.
>> >>
>> >> I have this in my execute build step in a freestyle job:
>> >>
>> >> ```
>> >> #!/usr/bin/env nix-shell
>> >> #!nix-shell -i bash
>> >>
>> >> jupyter --version
>> >> ```
>> >>
>> >> However, I am getting this output:
>> >>
>> >> ```
>> >> [workspace] $ /usr/bin/env nix-shell
>> >>
>> >>
>> >> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh
>> >> error: undefined variable ‘jupyter’ at
>> >>
>> >>
>> >> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh:4:1
>> >> ```
>> >>
>> >> From the output above, it looks like my script is being interpreted as
>> >> a nix expression instead.
>> >>
>> >> Has anyone else have experience loading the nix-shell in a Jenkins job?
>> >>
>> >> Thanks
>> >> Allan
>> >> ___
>> >> 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] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread roconnor
I am using the following expression which I believe will build a patched 
version of glibc locally, and then build a patched NixOS derivation.

system.replaceRuntimeDependencies = with pkgs.lib;
  [{original = pkgs.glibc; replacement = pkgs.stdenv.lib.overrideDerivation 
pkgs.glibc (oldAttr: { patches = oldAttr.patches ++
[(pkgs.fetchurl { url = 
"https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/glibc/cve-2015-7547.patch";;
  sha256 = 
"0awpc4rp2x27rjpj83ps0rclmn73hsgfv2xxk18k82w4hdxqpp5r";})];
   });}
  ];

I didin't time it, but I think it took around 25 minutes to update my 
desktop machine this way.  Good luck everyone.

On Tue, 16 Feb 2016, Shea Levy wrote:

> Hi all,
>
> Nathan Zadoks has offered to allow users to download the new glibc from
> his hydra while we wait for hydra.nixos.org to catch up. To fetch it, as
> root run:
>
> # nix-store -r /nix/store/5fbwy40pa4pqr97jdgbyaal1y1ns6hb1-glibc-2.21
> --option binary-caches https://code.nathan7.eu/hydra --option
> binary-cache-public-keys
> colossus.nathan7.eu:4iYLGVtL9WTE0OXgPQgQex0BIYopHxFuIYTERQ0dhCc=
>
> Obviously this assumes you trust his hydra to be providing a real
> result!
>
> You can then add this line to your configuration.nix:
>
>> system.replaceRuntimeDependencies = [ ({ original = pkgs.glibc;
>> replacement = builtins.storePath
>> /nix/store/5fbwy40pa4pqr97jdgbyaal1y1ns6hb1-glibc-2.21; }) ];
>
> and do a nixos-rebuild against the channel to get a secured system
> until the channel is updated.
>
> Regards,
> Shea
>
> On 2016-02-16 11:36, Shea Levy wrote:
>> Fixed patch pushed to master, 15.09, and 14.12.
>>
>> On 2016-02-16 10:58, Shea Levy wrote:
>>> There was an error with the patch, we're cooking up a fix now.
>>>
>>> On 2016-02-16 10:37, Shea Levy wrote:
 Hi all,

 I've just merged the patch to fix CVE-2015-7547, a buffer overrun
 in
 glibc with working POC exploit, into master and 15.09. It will take
 some
 time for the channel to update, so please use your judgment as to
 whether you want to wait for that or switch to building from git
 until
 it catches up. Please check out pkgs.replaceDependency



 (https://github.com/NixOS/nixpkgs/blob/15aa139a1a131b3e34a0b49425d87cffbf93d905/pkgs/build-support/replace-dependency.nix)

 for an alternative that won't require a full rebuild in the mean
 time.

 Eelco, Rob, can we do anything to ensure hydra capacity for the
 rebuild?

 ~Shea
 ___
 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
>
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>

-- 
Russell O'Connor  
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] loading the nix-shell in a jenkins job

2016-02-16 Thread zimbatm
Sorry I meant your wrapper would look like this:

  #!/bin/sh
  cat | ./your-script

Can you also gist or make attach an exact copy of your script to make sure
things like whitespaces are not an issue ?

On Tue, 16 Feb 2016 at 15:32 Allan Espinosa  wrote:

> Hi Jonas,
>
> Thanks for the tip.  I couldn't do what you said in Jenkins itself so
> I had to wrap nix-shell inside another shell wrapper:
>
> wrapper.sh:
> #!/bin/bash
>
> cat $1 | exec nix-shell
>
> Then i had my Jenkins job as follows:
> #!/path/to/wrapper.sh
> #!nix-shell -i bash
>
> jupyter --version
>
> Hope somebody else finds this useful.
>
> Regards,
> Allan
>
> On Tue, Feb 16, 2016 at 8:49 AM, zimbatm  wrote:
> > It looks legit.
> >
> > Something I noticed is that nix-shell still drops me in a shell if it
> thinks
> > that the input is interactive.
> >
> > Can you try to run the same command but with `cat | ` piped in front ?
> >
> > On Tue, 16 Feb 2016 at 02:06 Allan Espinosa  wrote:
> >>
> >> Hi,
> >>
> >> I've been trying to get one of my default.nix development environment
> >> build in a Jenkins job. I'm not trying to make a package but create a
> >> different artifact that will be consumed in a different way.
> >>
> >> I have this in my execute build step in a freestyle job:
> >>
> >> ```
> >> #!/usr/bin/env nix-shell
> >> #!nix-shell -i bash
> >>
> >> jupyter --version
> >> ```
> >>
> >> However, I am getting this output:
> >>
> >> ```
> >> [workspace] $ /usr/bin/env nix-shell
> >>
> >>
> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh
> >> error: undefined variable ‘jupyter’ at
> >>
> >>
> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh:4:1
> >> ```
> >>
> >> From the output above, it looks like my script is being interpreted as
> >> a nix expression instead.
> >>
> >> Has anyone else have experience loading the nix-shell in a Jenkins job?
> >>
> >> Thanks
> >> Allan
> >> ___
> >> 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] Wiki is dead

2016-02-16 Thread Profpatsch
On 16-02-14 09:15pm, zimbatm wrote:
> But before I invest more time, do you think it's a path worth pursuing ?
> Also what would be required for this to be considered "ready" ?

Wow, that’s great!

What are your thoughts on converting it to a nixos (and nix) cookbook,
akin to the Python Cookbook (http://shop.oreilly.com/product/9780596001674.do)
or the (freely accessible) Puppet Cookbook (http://www.puppetcookbook.com/)?

-- 
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@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Redesign of documentation

2016-02-16 Thread Profpatsch
On 16-02-15 06:57pm, Freddy Rietdijk wrote:
> Furthermore, I can imagine a third
> part with How To's could be added to the Nix user guide.

These are commonly called “Cookbook” and in my experience they
are an invaluable source of practical information.

We kind of have something similar in the current wiki, but
imo that would greatly benefit from good markup & peer review
Markdown (or similar) & Github gives us.

-- 
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@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread Shea Levy
Hi all,

Nathan Zadoks has offered to allow users to download the new glibc from 
his hydra while we wait for hydra.nixos.org to catch up. To fetch it, as 
root run:

# nix-store -r /nix/store/5fbwy40pa4pqr97jdgbyaal1y1ns6hb1-glibc-2.21 
--option binary-caches https://code.nathan7.eu/hydra --option 
binary-cache-public-keys 
colossus.nathan7.eu:4iYLGVtL9WTE0OXgPQgQex0BIYopHxFuIYTERQ0dhCc=

Obviously this assumes you trust his hydra to be providing a real 
result!

You can then add this line to your configuration.nix:

> system.replaceRuntimeDependencies = [ ({ original = pkgs.glibc; 
> replacement = builtins.storePath 
> /nix/store/5fbwy40pa4pqr97jdgbyaal1y1ns6hb1-glibc-2.21; }) ];

and do a nixos-rebuild against the channel to get a secured system 
until the channel is updated.

Regards,
Shea

On 2016-02-16 11:36, Shea Levy wrote:
> Fixed patch pushed to master, 15.09, and 14.12.
>
> On 2016-02-16 10:58, Shea Levy wrote:
>> There was an error with the patch, we're cooking up a fix now.
>>
>> On 2016-02-16 10:37, Shea Levy wrote:
>>> Hi all,
>>>
>>> I've just merged the patch to fix CVE-2015-7547, a buffer overrun 
>>> in
>>> glibc with working POC exploit, into master and 15.09. It will take
>>> some
>>> time for the channel to update, so please use your judgment as to
>>> whether you want to wait for that or switch to building from git
>>> until
>>> it catches up. Please check out pkgs.replaceDependency
>>>
>>>
>>> 
>>> (https://github.com/NixOS/nixpkgs/blob/15aa139a1a131b3e34a0b49425d87cffbf93d905/pkgs/build-support/replace-dependency.nix)
>>>
>>> for an alternative that won't require a full rebuild in the mean
>>> time.
>>>
>>> Eelco, Rob, can we do anything to ensure hydra capacity for the
>>> rebuild?
>>>
>>> ~Shea
>>> ___
>>> 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

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


Re: [Nix-dev] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread Shea Levy
Fixed patch pushed to master, 15.09, and 14.12.

On 2016-02-16 10:58, Shea Levy wrote:
> There was an error with the patch, we're cooking up a fix now.
>
> On 2016-02-16 10:37, Shea Levy wrote:
>> Hi all,
>>
>> I've just merged the patch to fix CVE-2015-7547, a buffer overrun in
>> glibc with working POC exploit, into master and 15.09. It will take
>> some
>> time for the channel to update, so please use your judgment as to
>> whether you want to wait for that or switch to building from git
>> until
>> it catches up. Please check out pkgs.replaceDependency
>>
>> 
>> (https://github.com/NixOS/nixpkgs/blob/15aa139a1a131b3e34a0b49425d87cffbf93d905/pkgs/build-support/replace-dependency.nix)
>>
>> for an alternative that won't require a full rebuild in the mean
>> time.
>>
>> Eelco, Rob, can we do anything to ensure hydra capacity for the
>> rebuild?
>>
>> ~Shea
>> ___
>> 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] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread Shea Levy
There was an error with the patch, we're cooking up a fix now.

On 2016-02-16 10:37, Shea Levy wrote:
> Hi all,
>
> I've just merged the patch to fix CVE-2015-7547, a buffer overrun in
> glibc with working POC exploit, into master and 15.09. It will take 
> some
> time for the channel to update, so please use your judgment as to
> whether you want to wait for that or switch to building from git 
> until
> it catches up. Please check out pkgs.replaceDependency
> 
> (https://github.com/NixOS/nixpkgs/blob/15aa139a1a131b3e34a0b49425d87cffbf93d905/pkgs/build-support/replace-dependency.nix)
>
> for an alternative that won't require a full rebuild in the mean 
> time.
>
> Eelco, Rob, can we do anything to ensure hydra capacity for the
> rebuild?
>
> ~Shea
> ___
> 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] CVE-2015-7547 stdenv-changing fix merged on master and 15.09

2016-02-16 Thread Shea Levy
Hi all,

I've just merged the patch to fix CVE-2015-7547, a buffer overrun in 
glibc with working POC exploit, into master and 15.09. It will take some 
time for the channel to update, so please use your judgment as to 
whether you want to wait for that or switch to building from git until 
it catches up. Please check out pkgs.replaceDependency 
(https://github.com/NixOS/nixpkgs/blob/15aa139a1a131b3e34a0b49425d87cffbf93d905/pkgs/build-support/replace-dependency.nix)
 
for an alternative that won't require a full rebuild in the mean time.

Eelco, Rob, can we do anything to ensure hydra capacity for the 
rebuild?

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


Re: [Nix-dev] loading the nix-shell in a jenkins job

2016-02-16 Thread Allan Espinosa
Hi Jonas,

Thanks for the tip.  I couldn't do what you said in Jenkins itself so
I had to wrap nix-shell inside another shell wrapper:

wrapper.sh:
#!/bin/bash

cat $1 | exec nix-shell

Then i had my Jenkins job as follows:
#!/path/to/wrapper.sh
#!nix-shell -i bash

jupyter --version

Hope somebody else finds this useful.

Regards,
Allan

On Tue, Feb 16, 2016 at 8:49 AM, zimbatm  wrote:
> It looks legit.
>
> Something I noticed is that nix-shell still drops me in a shell if it thinks
> that the input is interactive.
>
> Can you try to run the same command but with `cat | ` piped in front ?
>
> On Tue, 16 Feb 2016 at 02:06 Allan Espinosa  wrote:
>>
>> Hi,
>>
>> I've been trying to get one of my default.nix development environment
>> build in a Jenkins job. I'm not trying to make a package but create a
>> different artifact that will be consumed in a different way.
>>
>> I have this in my execute build step in a freestyle job:
>>
>> ```
>> #!/usr/bin/env nix-shell
>> #!nix-shell -i bash
>>
>> jupyter --version
>> ```
>>
>> However, I am getting this output:
>>
>> ```
>> [workspace] $ /usr/bin/env nix-shell
>>
>> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh
>> error: undefined variable ‘jupyter’ at
>>
>> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh:4:1
>> ```
>>
>> From the output above, it looks like my script is being interpreted as
>> a nix expression instead.
>>
>> Has anyone else have experience loading the nix-shell in a Jenkins job?
>>
>> Thanks
>> Allan
>> ___
>> 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] loading the nix-shell in a jenkins job

2016-02-16 Thread zimbatm
It looks legit.

Something I noticed is that nix-shell still drops me in a shell if it
thinks that the input is interactive.

Can you try to run the same command but with `cat | ` piped in front ?

On Tue, 16 Feb 2016 at 02:06 Allan Espinosa  wrote:

> Hi,
>
> I've been trying to get one of my default.nix development environment
> build in a Jenkins job. I'm not trying to make a package but create a
> different artifact that will be consumed in a different way.
>
> I have this in my execute build step in a freestyle job:
>
> ```
> #!/usr/bin/env nix-shell
> #!nix-shell -i bash
>
> jupyter --version
> ```
>
> However, I am getting this output:
>
> ```
> [workspace] $ /usr/bin/env nix-shell
>
> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh
> error: undefined variable ‘jupyter’ at
>
> /var/folders/bh/q33bp93j2js6zv27rds0n1x0gn/T/hudson5799651993425365822.sh:4:1
> ```
>
> From the output above, it looks like my script is being interpreted as
> a nix expression instead.
>
> Has anyone else have experience loading the nix-shell in a Jenkins job?
>
> Thanks
> Allan
> ___
> 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] Packaging Torch

2016-02-16 Thread zimbatm
qtwebkit doesn't appear if you grep pkgs/top-level/all-packages.nix but
it's imported from pkgs/development/libraries/qt-5/5.4/qtwebkit at the
moment.

Good luck with the packaging !

On Tue, 16 Feb 2016 at 13:30 Sergey Mironov  wrote:

> Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it
> looks like I have to package it first. The task is not going to be
> easy due to (lots of) Lua and NodeJS dependencies. Also, they require
> what Ubuntu guys call webkit-qt. Do we have this package?
>
> I've established a forked repo
>
>https://github.com/grwlf/torch-distro
>
> containing ./build.nix file of initial declarations (doesn't work yet)
> I'll be glad to receive advice/contributions from anyone.
>
> Regards,
> Sergey
> ___
> 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] Packaging Torch

2016-02-16 Thread Sergey Mironov
Hi, List. I'd like to use Torch (http://torch.ch/) on NixOS and it
looks like I have to package it first. The task is not going to be
easy due to (lots of) Lua and NodeJS dependencies. Also, they require
what Ubuntu guys call webkit-qt. Do we have this package?

I've established a forked repo

   https://github.com/grwlf/torch-distro

containing ./build.nix file of initial declarations (doesn't work yet)
I'll be glad to receive advice/contributions from anyone.

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


Re: [Nix-dev] Using nix-shell in messy trees with symlinks and binary files

2016-02-16 Thread Rok Garbas
look at `builtins.filterSource` in nix manual (http://nixos.org/nix/manual)

On Tue, Feb 16, 2016 at 1:05 PM, Kosyrev Serge
<_deepf...@feelingofgreen.ru> wrote:
> Good day, folks!
>
> What I'm seeing is a rather disturbingly odd, context-depenent behavior of 
> nix-shell:
>
> ,
> | [deepfire@andromedae:~/src/foo]$ nix-shell default.nix
> | warning: dumping very large path (> 256 MiB); this may run out of memory
> | error: file ‘/home/deepfire/src/foo/generated/rootfs/chroot/dev/fuse’ has 
> an unsupported type
> | (use ‘--show-trace’ to show detailed location information)
> |
> | [deepfire@andromedae:~/src/foo]$ mv default.nix scripts/
> |
> | [deepfire@andromedae:~/src/foo]$ nix-shell scripts/default.nix
> |
> | [nix-shell:~/src/foo]$
> `
>
> The directory structure, indeed, has some oddities -- device files,
> symlink loops, this kind of stuff.
>
> Consideration that nix-shell tries to compute some.. hash.. out of it all,
> sends shivers down my spine.  That's a lot of stuff to hash through.
>
> If this theory is, indeed, correct, what would be the way to make
> nix-shell disregard certain paths from the equation?
>
> --
> с уважениeм / respectfully,
> Косырев Сергей
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



-- 
Rok Garbas
http://www.garbas.si
r...@garbas.si
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Fwd: Redesign of documentation

2016-02-16 Thread Freddy Rietdijk
On Tue, Feb 16, 2016 at 10:50 AM, Christian Kauhaus 
wrote:

>
> In my opinion it would be helpful to cover the Nix language (language
> syntax,
> features and builtins) in a separate section.
>
>
I agree the Nix language should also be covered. Where do you think this
should be? For example an introduction to the Nix language in the User's
manual after or before explaining the introduction to the Nix package
manager?

On Tue, Feb 16, 2016 at 10:50 AM, Christian Kauhaus 
wrote:

> Am 15.02.2016 um 18:57 schrieb Freddy Rietdijk:
> > So, that's my idea about the documentation. What are your views about
> this
> > issue and the proposal? And remember, no talking about
> implementations/formats
> > just yet!
>
> In my opinion it would be helpful to cover the Nix language (language
> syntax,
> features and builtins) in a separate section.
>
> Regards
>
> Christian
>
> --
> Dipl-Inf. Christian Kauhaus <>< · k...@flyingcircus.io · +49 345 219401-0
> Flying Circus Internet Operations GmbH · http://flyingcircus.io
> Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
> HR Stendal 21169 · Geschäftsführer: Christian Theune, Christian Zagrodnick
>
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Wiki is dead

2016-02-16 Thread Matthias Beyer
I once created a wiki template based on jekyll and zurb foundation[0].

It should be possible to host this with gh-pages.

As far as I can remember, this is almost ready for use, though I'm not a web-dev
and it might have some ugly points in the interface, though the underlying code
should work.

I developed this after the discussion on killing the wiki in Nov. 2015. I
proposed this here, AFAICR, though there was no "lets do this" in here, so I
apandoned this project.

[0]: https://github.com/wiki-template/wiki.template

PS: Of course my wiki-template is not shaped in the nixos-website style.

On 14-02-2016 21:15:12, zimbatm wrote:
> Thanks Eelco !
> 
> Check this out: http://nixos-wiki-test.zimbatm.com/Main_Page/

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

Proudly sent with mutt.
Happily signed with gnupg.


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


Re: [Nix-dev] Haskell Infrastructure - Nix-Shell with Hoogle from cabal2nix

2016-02-16 Thread Andreas Herrmann
Hi Peter,

Thanks for your response.

On Monday 15 February 2016 19:17:52 Peter Simons wrote:
>  > In order to create a development environment, where I have
>  > `cabal-install` available as well, I can write the following Nix
>  > file: [...].
> 
> why don't you just put inherently compiler-agnostic tools like
> cabal-install, stack, alex, happy, etc. into your user's profile or
> system profile? Then all your nix-shells will have access to them.

I'm not using Nixos, but Nix in single user mode on a host system. I use Nix 
for a bunch of different things. To avoid any collisions I've developed a habit 
of keeping as many things as possible in separate nix-shells rather than in my 
user profile. In the case of cabal it probably wouldn't hurt to put it in my 
user profile. Here it was meant as an example of how to add things to the 
development environment.

On Sunday 14 February 2016 14:48:54 Andreas Herrmann wrote:
> shell.nix
> ~~~
> { nixpkgs ? import  { }, compiler ? "default" }:
> let
> 
>   inherit (nixpkgs) pkgs;
>   haskellPackages = if compiler == "default"
>   
> then pkgs.haskellPackages
> else pkgs.haskell.packages.${compiler};
>   
>   inherit (pkgs.haskell.lib) addBuildTools;
>   pkg = import ./pkg.nix { inherit nixpkgs compiler; };
> 
> in
> (addBuildTools pkg (with haskellPackages; [ cabal-install ])).env
> ~~~
> 
> 
> # My Question
> 
> How could I instead get a development environment with a Hoogle package
> database of all the dependencies. I know that I could manually create the
> following Nix file and use it with `nix-shell ./shell-manual.nix`.
> 
> shell-manual.nix
> ~~~
> { nixpkgs ? import  { }, compiler ? "default" }:
> let
> 
>   inherit (nixpkgs) pkgs;
>   haskellPackages = if compiler == "default"
>   
> then pkgs.haskellPackages
> else pkgs.haskell.packages.${compiler};
>   
>   ghc = haskellPackages.ghcWithHoogle (pkgs: with pkgs; [
>   
>   base bytestring cabal-install
> 
> ]);
> 
> in
> pkgs.stdenv.mkDerivation {
> 
>   name = "dummy";
>   buildInputs = [ ghc ];
>   shellHook = "eval $(egrep ^export ${ghc}/bin/ghc)";
> 
> }
> ~~~
> 
> However, then I would have to manually maintain an extra dependency list. Is
> there any way of transforming the Nix-Shell environment produced by
> `pkg.env`
> in `shell.nix` above into one that adds a Hoogle database of all the
> included
> packages?

In any case, the question about a Hoogle database remains. I find it very 
useful in situations where I don't have a reliable Internet connection at hand. 
(train/plane/etc.)

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


Re: [Nix-dev] Redesign of documentation

2016-02-16 Thread Christian Kauhaus
Am 15.02.2016 um 18:57 schrieb Freddy Rietdijk:
> So, that's my idea about the documentation. What are your views about this
> issue and the proposal? And remember, no talking about implementations/formats
> just yet!

In my opinion it would be helpful to cover the Nix language (language syntax,
features and builtins) in a separate section.

Regards

Christian

-- 
Dipl-Inf. Christian Kauhaus <>< · k...@flyingcircus.io · +49 345 219401-0
Flying Circus Internet Operations GmbH · http://flyingcircus.io
Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
HR Stendal 21169 · Geschäftsführer: Christian Theune, Christian Zagrodnick



signature.asc
Description: OpenPGP digital signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] How to set up your own Hydra server (video tutorial)

2016-02-16 Thread Peter Simons
Hi folks,

as promised before [1], my presentation from the January NixOS Meet-up
in Berlin is now available on Youtube:

https://www.youtube.com/watch?v=RXV0Y5Bn-QQ

The video is provides a tutorial how to configure your own Hydra server.
There is a bunch of configuration files at

https://github.com/peti/hydra-tutorial

that you can feed to Nixops to deploy a distributed build farm using
virtual machines running on your desktop or laptop, but obviously the
setup works fine in anyone's configuration.nix file on real hardware,
too.

Please know that I am by no means an expert on Hydra and there are a lot
of topics that the presentation doesn't cover! It's probably good enough
to get you started using Hydra for continuous integration for populating
your personal binary cache, but questions like release management or how
to set up your distribution channel aren't covered.

Anyway, if you have questions about the subject, please feel free to ask
in this thread or, if you prefer, in the comment section of the Youtube
video.

Best regards,
Peter


[1] http://lists.science.uu.nl/pipermail/nix-dev/2016-January/019271.html

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


Re: [Nix-dev] problem with automounted ntfs partitions

2016-02-16 Thread Thomas Hunger
Hi Mate,

Can you try

nix-env -iA nixos.ntfs3g

instead?

On 16 February 2016 at 07:10, Máté Kovács  wrote:

> Hi all,
>
> The problem I'm trying to solve is that automounted ntfs partitions are
> read-only.
>
> For example, `mount | column -t` lists
> /dev/sdb1   on  /run/media/mate/adata   type  ntfs
>  
> (ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0177,dmask=077,nls=utf8,errors=continue,mft_zone_multiplier=1,uhelper=udisks2)
> after I connect my external HDD.
>
> I read somewhere that the problem is likely a lack of ntfs-3g, so I'm
> trying to install that, unfortunately without much success.
>
> What's strange is that `nix-env -qaP | grep -i ntfs` lists
> nixos.ntfs3g
>  ntfs-3g-2015.3.14
> yet `nix-env -i ntfs3g` insists on showing
> error: selector ‘ntfs3g’ matches no derivations
>
> What am I doing wrong?
> How do I install ntfs-3g? Is that even what I need to do here?
>
> Thanks,
> Mate
>
>
>
> ___
> 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] Dynamic substituteInPlace

2016-02-16 Thread stewart mackenzie
hey zimbatm,

On Tue, Feb 16, 2016 at 6:04 AM, zimbatm  wrote:
> It's not super clear to me what you are trying to achieve. Maybe you've
> zoomed into that specific solution but with more context there might be
> others available.

I suspect this might be the case.

> Is the file compiled or is it interpreted ?

rust src files are compiled, subnets are used to link (not a GNU ld
linker type link, but as in graph theory, a node links to another node
via an edge) rust shared objects at runtime, these links carry
messages, where messages are structured using capnproto contracts. We
have features to adjust the execution graph at runtime, but we're
currently not making use of them.

>
> I understand that you want to provide some information at runtime and
> resolve the path to a derivation. How is that information provided to the
> runtime

subnets are programmed by humans at development time, the programmer
knows the names of derivations and ask for them as a surgeon asks a
nurse for an instrument by name.
Nix then rewrites those names to the full path just before compile time.
Nix then makes a new derivation for the compiled executable and links
in all the dependencies (via hierarchies of subnets).
when you run the executable all the subnets have already had their
derivation names substituted and are ready to be processed by the fvm
parser. Each component (a subnet and *.so is a component) has their
own derivation in the /nix/store/

> and is the name of the derivation in a limited set ?

the name of the derivation is in a limited set
(https://github.com/sjmackenzie/fractalide/blob/fractalide/components/default.nix),
if the name is not found I want the compilation to abort.
I extract the derivations names from a subnet here:
https://github.com/sjmackenzie/fractalide/blob/fractalide/build-support/buildFractalideSubnet.nix#L11

Then check [1] to see if the component is a *.so or subnet here:
https://github.com/sjmackenzie/fractalide/blob/fractalide/build-support/buildFractalideSubnet.nix#L19

then I want to substituteInPlace the name for the full path to the
/nix/store//lib/lib.subnet or
/nix/store//lib/libcomponent.so
The parser will then read the subnet file and the allocator will load
that shared object into memory, or if it's another subnet then it'll
load that and add some more nodes and edges to the message passing
execution graph.

we can have deep hierarchies of subnets, but they all end in a rust
components (ie libcomponent.so), it's at this point, nix lazily stop
evaluating that subnet branch.

> Maybe all you need is patchelf if you're compiling a program dynamically but
> want to update it later to point to the .so object.
>
>
This point opens unthought out pathways, in the near future we want a
hypercard type program (built using fractalide components), I was
thinking how to introduce new components into an environment
dynamically.
It would be interesting to patchElf a running hypercard program
dynamically and introduce these new .so objects... I don't know yet.
:-)


[1] It's at this point I get this error:

[stewart@rivergod:~/dev/fractalide/fractalide]$ nix-build -A
components.maths_boolean_and fvm.nix
error: string 
‘/nix/store/y206xxi12nf961m8m2svhbf5x3w34nqh-maths_boolean_nand/lib/lib.subnet’
cannot refer to other paths, at
/home/stewart/dev/fractalide/fractalide/build-support/buildFractalideSubnet.nix:19:14
(use ‘--show-trace’ to show detailed location information)

maths_boolean_and is a subnet:
https://github.com/sjmackenzie/fractalide/blob/fractalide/components/maths/boolean/and/lib.subnet
which references maths_boolean_nand (a shared library:
https://github.com/sjmackenzie/fractalide/blob/fractalide/components/maths/boolean/nand/src/lib.rs)
and maths_boolean_not (another subnet:
https://github.com/sjmackenzie/fractalide/blob/fractalide/components/maths/boolean/not/lib.subnet)

Eventually the all of these testing/example maths_boolean_* will point
to maths_boolean_nand (except, obviously, maths_boolean_print)

---

Alternatively we could do away with humans developing in lib.subnets
and get them to write the subnets *in* a nix file, then we can quite
easily make use of things like this:

" 'text' -> input_port var_name_instance(${(builtins.tryEval
components."a_dynamic_component_name").value}) output_port "

I could pull that out into a function

" 'text' -> input_port var_name_instance(${find
"a_dynamic_component_name"}) output_port "

but now it's becoming super annoying and the programmer cannot easily
and quickly write subnets, also there is no subnet syntax highlighting
in nix files.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev