Re: [Nix-dev] Unwanted, unannounced reboot

2016-08-30 Thread Jeffrey David Johnson
I have a probably-unrelated issue, but mentioning it just in case. Mine 
involves VirtualBox. When starting up I will log in and open my email or 
something, but in the background the vboxnet0 service will be failing to start 
via systemd. When it times out after 90 sec the X server is killed without 
warning and I'm back at login.
Jeff

On Tue, 30 Aug 2016 14:31:11 +0200
Matthias Beyer  wrote:

> Hi,
> 
> this is the third time I got a unwanted, unannounced reboot of my 
> Thinkpad X220. The device just went off and rebooted.
> 
> My logs:
> 
> Aug 30 13:16:23 yuu audit[27536]: SECCOMP auid=1000 uid=1000 gid=100 
> ses=1 pid=27536 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chromium"
>  sig=0 arch=c03e syscal
> Aug 30 13:16:23 yuu audit[27537]: SECCOMP auid=1000 uid=1000 gid=100 
> ses=1 pid=27537 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chromium"
>  sig=0 arch=c03e syscal
> Aug 30 13:16:23 yuu audit[27539]: SECCOMP auid=1000 uid=1000 gid=100 
> ses=1 pid=27539 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chromium"
>  sig=0 arch=c03e syscal
> Aug 30 13:16:23 yuu audit[27538]: SECCOMP auid=1000 uid=1000 gid=100 
> ses=1 pid=27538 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chromium"
>  sig=0 arch=c03e syscal
> Aug 30 13:16:23 yuu kernel: audit: type=1326 audit(1472555783.141:55627): 
> auid=1000 uid=1000 gid=100 ses=1 pid=27539 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chro
> Aug 30 13:16:23 yuu kernel: audit: type=1326 audit(1472555783.141:55628): 
> auid=1000 uid=1000 gid=100 ses=1 pid=27538 comm="chromium" 
> exe="/nix/store/28b56yiqshs8kvnha23vvwp0m4rlyyis-chromium-52.0.2743.116/libexec/chromium/chro
> -- Reboot --
> Aug 30 14:17:20 yuu systemd-journald[570]: Runtime journal 
> (/run/log/journal/) is 8.0M, max 398.4M, 390.4M free.
> Aug 30 14:17:21 yuu systemd-journald[570]: System journal 
> (/var/log/journal/) is 1.9G, max 4.0G, 2.0G free.
> Aug 30 14:17:21 yuu systemd-journald[570]: Time spent on flushing to /var 
> is 1.345ms for 2 entries.
> Aug 30 14:17:21 yuu kernel: Linux version 4.7.0 (nixbld@localhost) (gcc 
> version 5.4.0 (GCC) ) #1-NixOS SMP Sun Jul 24 19:23:50 UTC 2016
> 
> So, as you can see, there is no shutdown process (stopping processes,
> closing journal, etc).
> 
> What is this? How does this happen?
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Raspberry-Pi NixOS

2016-06-15 Thread Jeffrey David Johnson
I tried a few months ago and wasn't able to get it working. It runs, but
I wasn't able to upgrade Nix. May have been a temporary problem fixed in
recent versions though.
Jeff

On Wed, 15 Jun 2016 15:19:19 +0200
Matthias Beyer  wrote:

> On 15-06-2016 14:52:22, Lluís Batlle i Rossell wrote:
> > I use nixos in the pi2 since pre-15.09. Now with 16.03.
> 
> That sounds awesome, so I guess it is not that hard to set up.
> 
> Are there substitutes available or do you use the raspberry itself or some 
> other
> machine to build packages for ARM?
> 
> > 
> > On Wed, Jun 15, 2016 at 02:26:51PM +0200, Bas van Dijk wrote:
> > > LumiGuide [...] NixOS like all our other machines.
> 
> Sounds like a nice place to work at! :-)
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Latex package to handle unicode characters?

2016-06-06 Thread Jeffrey David Johnson
I was using texLiveFull until recently, but now it's marked broken and a 
comment points users to the texlive.combine method. I tried checking out an 
older version of pkgs/tools/typesetting/tex but the dependencies don't line up 
with the rest of nixpkgs anymore. Probably I just want the full set of 
texlive-new packages, even if they're big, becuase I don't know what I'm doing 
enough to pick and choose. So I tried this monster (all collections + inputenc 
packages):

  myTexlive = with pkgs; texlive.combine {
inherit (texlive)
  collection-basic
  collection-bibtexextra
  collection-binextra
  collection-context
  collection-fontsextra
  collection-fontsrecommended
  collection-fontutils
  collection-formatsextra
  collection-games
  collection-genericextra
  collection-genericrecommended
  collection-htmlxml
  collection-humanities
  collection-langafrican
  collection-langarabic
  collection-langchinese
  collection-langcjk
  collection-langcyrillic
  collection-langczechslovak
  collection-langenglish
  collection-langeuropean
  collection-langfrench
  collection-langgerman
  collection-langgreek
  collection-langindic
  collection-langitalian
  collection-langjapanese
  collection-langkorean
  collection-langother
  collection-langpolish
  collection-langportuguese
  collection-langspanish
  collection-latex
  collection-latexextra
  collection-latexrecommended
  collection-luatex
  collection-mathextra
  collection-metapost
  collection-music
  collection-omega
  collection-pictures
  collection-plainextra
  collection-pstricks
  collection-publishers
  collection-science
  collection-texworks
  collection-wintools
  collection-xetex
  greek-inputenc;
  };

Still the same error though. Maybe it's a pandoc issue after all.
Jeff

On Wed, 1 Jun 2016 02:45:18 -0700
Linus Arver  wrote:

> On Sun, May 29, 2016 at 04:56:12PM -0700, Jeffrey David Johnson wrote:
> > I get the following error when exporting some markdown to PDF with pandoc:
> > 
> > An error occured: PDF creation failed:
> > ! Package inputenc Error: Unicode char \u8:  not set up for use with 
> > LaTeX.
> > 
> > See the inputenc package documentation for explanation.
> > Type  H   for immediate help.
> >  ...  
> >   
> > l.150   Evolutionary Analysis}
> > 
> > Try running pandoc with --latex-engine=xelatex.
> > 
> > I could hunt this one character down, but is there a package I could add to 
> > my texlive environment that might help handle this type of problem in 
> > general?
> 
> I used to use the texliveFull package, which included xelatex.
> 
> FWIW, I no longer use texliveFull; instead I use a Docker container for
> all TeX-related things as it is much simpler to use along with
> negligible maintenence costs, if at all.
> 
> > So far I just use the standard one:
> > 
> > myTexLive = texlive.combine {
> >   inherit (texlive) scheme-small;
> > };
> > 
> > Don't see any mention of xelatex in nixpkgs.
> 
> That's probably because it still comes with texliveFull, which is what
> most people use I imagine.
> 
> > Ideally I'd like to handle all of unicode, but just skipping any 
> > unrenderable characters would be OK too, since I gather latex doesn't do 
> > that yet?
> 
> AFAIK, Latex never dealt with Unicode natively. Xelatex has much simpler
> font support (fontspec) so I've always opted for Xelatex from the beginning.
> 
> Best,
> Linus
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] python2nix requires old pip?

2016-06-06 Thread Jeffrey David Johnson
What's the current state of the py*2nix helpers? I just tried to run python2nix 
and got this:

$ python2nix 
Traceback (most recent call last):
  File 
"/nix/store/mpzwan1fyraps3kmigpda76lzyj9r9qy-python2nix-20140927/bin/.python2nix-wrapped",
 line 8, in 
from python2nix import main
  File 
"/nix/store/mpzwan1fyraps3kmigpda76lzyj9r9qy-python2nix-20140927/lib/python2.7/site-packages/python2nix/__init__.py",
 line 5, in 
from python2nix import pip_deps
  File 
"/nix/store/mpzwan1fyraps3kmigpda76lzyj9r9qy-python2nix-20140927/lib/python2.7/site-packages/python2nix/pip_deps.py",
 line 15, in 
from pip.log import logger
ImportError: No module named log

It worked for me until recently. Is anyone else currently using it? According 
to https://github.com/proger/python2nix it requires pip==1.5.6, so I'm guessing 
that just needs to be hunted down and added as a dependency.

Also tried cloning the two pypi2nix repos (https://github.com/garbas/pypi2nix 
and https://github.com/offlinehacker/pypi2nix) but couldn't get either of them 
to work.
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Latex package to handle unicode characters?

2016-05-29 Thread Jeffrey David Johnson
I get the following error when exporting some markdown to PDF with pandoc:

An error occured: PDF creation failed:
! Package inputenc Error: Unicode char \u8:  not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H   for immediate help.
 ...  
  
l.150   Evolutionary Analysis}

Try running pandoc with --latex-engine=xelatex.

I could hunt this one character down, but is there a package I could add to my 
texlive environment that might help handle this type of problem in general? So 
far I just use the standard one:

myTexLive = texlive.combine {
  inherit (texlive) scheme-small;
};

Don't see any mention of xelatex in nixpkgs. Ideally I'd like to handle all of 
unicode, but just skipping any unrenderable characters would be OK too, since I 
gather latex doesn't do that yet?

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


[Nix-dev] Wrap Debian packages with buildFHSUserEnv

2015-12-05 Thread Jeffrey David Johnson
I read this post by Anders J Papitto:

http://anderspapitto.com/posts/2015-02-28-deb-installation-nixos.html

and got excited. You can actually install Debian packages? Even complex
ones like Steam? I started refactoring his example and surprisingly it
wasn't hard to put in an automation-friendly format. So my question is
why has no one done this before? Is it considered a bad idea? Are there
legal issues? Have I just not heard of it? And if not, any interest in
extending it to cover more packages and/or have a proper deb2nix script?

Here's the code, which can be unzipped and run with `nix-build`:

https://gist.github.com/jefdaj/9c88c5f9712f33faf7b1

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


Re: [Nix-dev] Tablet stylus stopped working

2015-09-21 Thread Jeffrey David Johnson
Solution in case someone has the same issue in the future: it's nothing
to do with NixOS. Alexei was correct. Got a new stylus (HP instead of a
knock-off this time) and it works again.
Jeff

On Sun, 13 Sep 2015 18:37:39 -0700
Jeffrey David Johnson  wrote:

> Yeah I think you're right. Unfortunately this computer also has issues
> booting from anything but the internal HDD so that's a lot of work.
> Will probably just give up on using it for the current round of
> presentations and figure it out later.
> Jeff
> 
> On Mon, 14 Sep 2015 08:59:41 +1000
> Alexei Robyn  wrote:
> 
> > There might be, but if you've rebooted into known-working configurations
> > and it's still not functional, you're probably better off moving
> > straight on to testing on a different distro and computer to confirm
> > whether or not it's the stylus.
> > 
> > - Alexei
> > 
> > On Mon, Sep 14, 2015, at 08:57 AM, Jeffrey David Johnson wrote:
> > > My wacom stylus recently stopped working. I wasn't doing anything
> > > nix-related at the time (just working in Inkscape) and booting into
> > > older generations doesn't fix it. The eraser tip and side button keep
> > > working but nothing from the main tip. I can't get it to show up in xev
> > > or kde_wacom_tabletfinder. Is there anywhere else to look before
> > > assuming it's a hardware failure? This is the tablet section of my
> > > configuration.nix:
> > > 
> > > # ...
> > > environment.systemPackages = [
> > >   libwacom
> > >   xf86_input_wacom
> > > ];
> > > services = {
> > >   xserver = {
> > > wacom.enable = true;
> > > synaptics = {
> > >   enable = true;
> > >   twoFingerScroll = true;
> > > };
> > >   };
> > > };
> > > # ...
> > > 
> > > Thanks
> > > Jeff
> > > ___
> > > 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] Tablet stylus stopped working

2015-09-13 Thread Jeffrey David Johnson
Yeah I think you're right. Unfortunately this computer also has issues
booting from anything but the internal HDD so that's a lot of work.
Will probably just give up on using it for the current round of
presentations and figure it out later.
Jeff

On Mon, 14 Sep 2015 08:59:41 +1000
Alexei Robyn  wrote:

> There might be, but if you've rebooted into known-working configurations
> and it's still not functional, you're probably better off moving
> straight on to testing on a different distro and computer to confirm
> whether or not it's the stylus.
> 
> - Alexei
> 
> On Mon, Sep 14, 2015, at 08:57 AM, Jeffrey David Johnson wrote:
> > My wacom stylus recently stopped working. I wasn't doing anything
> > nix-related at the time (just working in Inkscape) and booting into
> > older generations doesn't fix it. The eraser tip and side button keep
> > working but nothing from the main tip. I can't get it to show up in xev
> > or kde_wacom_tabletfinder. Is there anywhere else to look before
> > assuming it's a hardware failure? This is the tablet section of my
> > configuration.nix:
> > 
> > # ...
> > environment.systemPackages = [
> >   libwacom
> >   xf86_input_wacom
> > ];
> > services = {
> >   xserver = {
> > wacom.enable = true;
> > synaptics = {
> >   enable = true;
> >   twoFingerScroll = true;
> > };
> >   };
> > };
> > # ...
> > 
> > Thanks
> > Jeff
> > ___
> > 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] Tablet stylus stopped working

2015-09-13 Thread Jeffrey David Johnson
My wacom stylus recently stopped working. I wasn't doing anything
nix-related at the time (just working in Inkscape) and booting into
older generations doesn't fix it. The eraser tip and side button keep
working but nothing from the main tip. I can't get it to show up in xev
or kde_wacom_tabletfinder. Is there anywhere else to look before
assuming it's a hardware failure? This is the tablet section of my
configuration.nix:

# ...
environment.systemPackages = [
  libwacom
  xf86_input_wacom
];
services = {
  xserver = {
wacom.enable = true;
synaptics = {
  enable = true;
  twoFingerScroll = true;
};
  };
};
# ...

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


Re: [Nix-dev] How to debug 'error: getting status of ... no such file or directory'?

2015-09-02 Thread Jeffrey David Johnson
OK figured it out. I had an obsolete symlink
from /etc/nixos/configuration.nix into /git/hub/dotfiles, and
nixos-rebuild must have been evaluating my current code without
following it. Would be nice to have a more informative error message,
but then again maybe I deserved that for relocating everything! Fixed
by deleting /etc/nixos.
Jeff

On Tue, 1 Sep 2015 12:07:12 -0700
Jeffrey David Johnson  wrote:

> I have what seems like a straightforward issue with paths, but am not
> sure how to debug it. I run my usual "update everything" script, which
> looks like this and is located at /git/hub/nixcfg/install.sh:
> 
> #!/usr/bin/env bash
> # Automates rebuilding nixos from my repos.
> # Takes the same args as nixos-rebuild.
> # TODO also put NIXPKGS_CONFIG in here instead of home dir
> 
> NIXCFG="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
> [[ -z "$@" ]] && NIXARGS="test --fast" || NIXARGS="$@"
> 
> nixos-rebuild \
>   -I mypkgs="${NIXCFG}/mypkgs" \
>   -I nixpkgs="${NIXCFG}/nixpkgs" \
>   -I nixos-config="${NIXCFG}/configs/$(hostname).nix" \
>   ${NIXARGS} \
>   && nix-store --optimize
> 
> It works on my current master nixpkgs branch:
> 
> $ sudo ./install.sh switch
> building Nix...
> building the system configuration...
> warning: dumping very large path (> 256 MiB); this may run out of memory
> ...
> reloading the following units: dbus.service
> starting the following units: cron.service
> 862.90 MiB freed by hard-linking 37947 files
> 
> But when I switch to the new 15.09 branch I get an error:
> 
> $ sudo ./install.sh switch
> building Nix...
> error: getting status of ‘/git/hub/dotfiles’: No such file or directory
> building the system configuration...
> error: getting status of ‘/git/hub/dotfiles’: No such file or directory
> 
> There isn't a directory /git/hub/dotfiles, but I do
> use /git/hub/nixcfg/dotfiles and my code contains some relative
> references `like dotDir = ../dotfiles;`
> inside /git/hub/nixcfg/modules. So I assume that's going wrong. But
> after replacing them all with absolute paths I still get the same thing.
> 
> Now I'm not sure what to do next. `--show-trace` doesn't give any more
> info. How do I debug it? Thanks
> Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] How to debug 'error: getting status of ... no such file or directory'?

2015-09-01 Thread Jeffrey David Johnson
I have what seems like a straightforward issue with paths, but am not
sure how to debug it. I run my usual "update everything" script, which
looks like this and is located at /git/hub/nixcfg/install.sh:

#!/usr/bin/env bash
# Automates rebuilding nixos from my repos.
# Takes the same args as nixos-rebuild.
# TODO also put NIXPKGS_CONFIG in here instead of home dir

NIXCFG="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
[[ -z "$@" ]] && NIXARGS="test --fast" || NIXARGS="$@"

nixos-rebuild \
  -I mypkgs="${NIXCFG}/mypkgs" \
  -I nixpkgs="${NIXCFG}/nixpkgs" \
  -I nixos-config="${NIXCFG}/configs/$(hostname).nix" \
  ${NIXARGS} \
  && nix-store --optimize

It works on my current master nixpkgs branch:

$ sudo ./install.sh switch
building Nix...
building the system configuration...
warning: dumping very large path (> 256 MiB); this may run out of memory
...
reloading the following units: dbus.service
starting the following units: cron.service
862.90 MiB freed by hard-linking 37947 files

But when I switch to the new 15.09 branch I get an error:

$ sudo ./install.sh switch
building Nix...
error: getting status of ‘/git/hub/dotfiles’: No such file or directory
building the system configuration...
error: getting status of ‘/git/hub/dotfiles’: No such file or directory

There isn't a directory /git/hub/dotfiles, but I do
use /git/hub/nixcfg/dotfiles and my code contains some relative
references `like dotDir = ../dotfiles;`
inside /git/hub/nixcfg/modules. So I assume that's going wrong. But
after replacing them all with absolute paths I still get the same thing.

Now I'm not sure what to do next. `--show-trace` doesn't give any more
info. How do I debug it? Thanks
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] imported archive lacks a signature?

2015-08-28 Thread Jeffrey David Johnson
Thanks, that works!

On Fri, 28 Aug 2015 10:45:06 +0200
Peter Simons  wrote:

> Hi Jeffrey,
> 
>  > $ nix-copy-closure --to jefdaj@server $(type -tP labwiki)
>  > [...]
>  > error: imported archive of 
> ‘/nix/store/cgddwzz9hkdgprvbymphv8yprc66zxk7-ghc-7.10.1’ lacks a signature
> 
> to remedy that issue, create /etc/nix/signing-key.{pub,sec} as described in
> . Then call the
> nix-copy-closure command with the "--sign" flag.
> 
> Best regards,
> Peter
> 
> ___
> 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] imported archive lacks a signature?

2015-08-28 Thread Jeffrey David Johnson
What does this error mean?

$ nix-copy-closure --to jefdaj@server $(type -tP labwiki)
copying 166 missing paths (1820.22 MiB) to ‘jefdaj@server’...
exporting path ‘/nix/store/cgddwzz9hkdgprvbymphv8yprc66zxk7-ghc-7.10.1’
exporting path 
‘/nix/store/0j60852jsskjl2x3mv0a1ssrkb18hymz-haskell-old-locale-1.0.0.7’
exporting path 
‘/nix/store/21k662hg1jics83kh9x2r3cfp9fd4cll-haskell-network-2.6.1.0’
error: imported archive of 
‘/nix/store/cgddwzz9hkdgprvbymphv8yprc66zxk7-ghc-7.10.1’ lacks a signature

I can't find anything about signatures in https://nixos.org/nixos/manual/.

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


Re: [Nix-dev] Logo improvement ideas

2015-08-23 Thread Jeffrey David Johnson
I like logo-slant-half best. They're all good though!

On Mon, 24 Aug 2015 03:20:20 +
Luke Clifton  wrote:

> Hi Tim,
> 
> Nice work, I quite like the look of the 'hex' variations.
> 
> Regards,
> 
> Luke
> 
> 
> On Mon, 24 Aug 2015 at 13:14 Tim Cuthbertson  wrote:
> 
> > Hello all,
> >
> > I'm a big fan of Nix / NixOS, but I've long felt that the logo could
> > do with a bit of work. So I toyed about a bit with inkscape, and came
> > up with a few ideas:
> >
> > https://github.com/gfxmonk/nixos-logo-ideas/tree/master/exports
> >
> > They mostly keep to the existing logo structure, but with some changes:
> >
> >  - Make the lines wider, and remove the rounded caps. The existing
> > logo feels too thin, as if it's made of lines rather than shapes. This
> > feels fragile, particularly when scaled down.
> >
> >  - Made the lambda structure more obvious. To be honest, it wasn't
> > until fairly recently that I noticed that the logo was made of
> > lambdas. I've added gaps between each one so they don't run into a
> > single shape as much. I've also added some subtle gradients at the top
> > of each, to turn it into more of a woven structure, rather than a
> > snowflake.
> >
> >  - Rotated the shape so that there's an upright lambda, and the shape
> > fits better into a restricted-height context (e.g a header bar).
> >
> > # Shape variants:
> >
> > "straight": More or less equivalent to the current logo, but with
> > straight (not rounded) edges
> >
> > "hex": Blockier in general, and gives the short foot of the lambda a
> > triangular edge. This aligns all outer points to a hexagon shape,
> > mirroring the inner hexagon.
> >
> > "slant": The lambdas in this one have a fatter head and thinner feet.
> > This makes the overall structure look more dynamic and organic, but
> > de-emphasizes the clean lambda shape somewhat. The shapes on this one
> > may need some tweaking, as the outer shape (made by the feet) still
> > seems a little disorganized still.
> >
> > # Highlight variants:
> >
> > "none": every lambda has the same shading
> >
> > "half": every second shape is darker (as in the current logo)
> >
> > "feature": the right-way-up lambda is the only darker shape. This
> > makes the repeating lambda structure more obvious, but obviously
> > affects symmetry.
> >
> > I haven't done too much experimentation with the colours, but feel
> > free to crack open the svgs (in the parent directory) and try whatever
> > you like.
> >
> > Let me know what you think!
> >
> > Cheers,
> >  - Tim.
> > ___
> > 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] Mark two packages incompatible, but with the same priority?

2015-08-18 Thread Jeffrey David Johnson
Nevermind, just noticed the same behavior with plain bitcoin vs bitcoind, so 
maybe it's OK as is?

On Tue, 18 Aug 2015 11:11:40 -0700
Jeffrey David Johnson  wrote:

> I'm trying to add BitcoinXT support. Changes here:
> 
> https://github.com/NixOS/nixpkgs/compare/master...jefdaj:bitcoinxt-pullreq
> 
> It works as long as you only install bitcoin or bitcoin-xt, but trying
> one after the other they collide. Is there a way to set it up so
> installing either one overrides the other cleanly?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Mark two packages incompatible, but with the same priority?

2015-08-18 Thread Jeffrey David Johnson
I'm trying to add BitcoinXT support. Changes here:

https://github.com/NixOS/nixpkgs/compare/master...jefdaj:bitcoinxt-pullreq

It works as long as you only install bitcoin or bitcoin-xt, but trying
one after the other they collide. Is there a way to set it up so
installing either one overrides the other cleanly?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Nix-prefetch-git from branch?

2015-08-10 Thread Jeffrey David Johnson
How do I nix-prefetch-git from a branch other than master? I've tried the -m, 
-t, and -f flags but none of them seems to work with a commit id or branch 
name. I just get:

error: hash ‘repourlhere’ has wrong length for hash type ‘sha256’
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] How do I get the system crontab to work?

2015-07-12 Thread Jeffrey David Johnson
I see here that there are upstream issues with cron as far as setting user 
crontab entries:

http://lists.science.uu.nl/pipermail/nix-dev/2014-September/014120.html

But I'm having trouble setting the system ones as well. I think if they didn't 
work
at all a lot of other things would fail, so I must be setting something wrong. 
This
simple test doesn't put any files in /tmp or send any emails:

services.cron = {
  enable = true;
  mailto = "jef...@gmail.com";
  systemCronJobs = [
"* * * * *  test ls -l / > /tmp/cronout 2>&1"
"* * * * *  
/nix/store/wc472nw0kyw0iwgl6352ii5czxd97js2-coreutils-8.23/bin/test 
/nix/store/wc472nw0kyw0iwgl6352ii5czxd97js2-coreutils-8.23/bin/ls -l / > 
/tmp/cronout 2>&1"
  ];
};

I've checked that it does get written to /etc/crontab:

SHELL=/nix/store/xlxjcjq3bnbwnzq82irlzwxhmx6fvc2w-bash-4.3-p33/bin/bash
PATH=/nix/store/fpqvi360cimx3h1kxdxfvkyip52d1i8y-system-path/bin:/nix/store/fpqvi360cimx3h1kxdxfvkyip52d1i8y-system-path/sbin
MAILTO="jef...@gmail.com"

NIX_CONF_DIR=/etc/nix
* * * * * test ls -l / > /tmp/cronout 2>&1
* * * * * /nix/store/wc472nw0kyw0iwgl6352ii5czxd97js2-coreutils-8.23/bin/test 
/nix/store/wc472nw0kyw0iwgl6352ii5czxd97js2-coreutils-8.23/bin/ls -l / > 
/tmp/cronout 2>&1

And that the test and ls binaries are on that PATH. Anything else I should try?
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Garbled man pages/incomplete environment

2015-07-05 Thread Jeffrey David Johnson
Yeah I think that's what caused it. I got all my normal environment variables 
back by removing the lib.mkForce and using lib.mkOverride instead on just 
NIX_PATH, and now my PAGER is set to that and man pages work.
Jeff

On Sun, 05 Jul 2015 20:53:35 +0200
Eelco Dolstra  wrote:

> Hi,
> 
> On 04/07/15 18:24, Jeffrey David Johnson wrote:
> 
> > Man pages are hard to read because they're full of control characters. For 
> > example:
> > 
> > NIXOS-REBUILD(8)  NixOS Reference Pages  
> > NIXOS-REBUILD(8)
> > 
> > ESC[1mNAMEESC[0m
> 
> This can be a symptom of $PAGER not being set to "less -R".
> 
> -- 
> 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
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Garbled man pages/incomplete environment

2015-07-05 Thread Jeffrey David Johnson
If I do that it complains that NIX_PATH is set elsewhere already. I
think it's merging the attribute sets but not individual attributes.
Which is good, wouldn't want it just concatenating strings or something
else magical. That's why I originally put in the lib.mkForce to
override it.

Thanks for mentioning it though, because that led me to figure it out! I
found the function that does the merging in
nixpkgs/nixos/modules/config/shells-environment.nix:

environment.variables = mkOption {
  default = {};
  description = ''
A set of environment variables used in the global environment.
These variables will be set on shell initialisation.
The value of each variable can be either a string or a list of
strings.  The latter is concatenated, interspersed with colon
characters.
  '';
  type = types.attrsOf (mkOptionType {
name = "a string or a list of strings";
merge = loc: defs:
  let
defs' = filterOverrides defs;
res = (head defs').value;
  in
  if isList res then concatLists (getValues defs')
  else if lessThan 1 (length defs') then
throw "The option `${showOption loc}' is defined multiple
times, in ${showFiles (getFiles defs)}." else if !isString res then
throw "The option `${showOption loc}' does not have a
string value, in ${showFiles (getFiles defs)}." else res;
  });
  apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v
else v); };

The mkOverrides looked related, so I found it in
nixpkgs/lib/modules.nix. It's a little over my head but the comments
explain:

  /* Given a list of config values, process the mkOverride properties,
 that is, return the values that have the highest (that is,
 numerically lowest) priority, and strip the mkOverride
 properties.  For example,

   [ { file = "/1"; value = mkOverride 10 "a"; }
 { file = "/2"; value = mkOverride 20 "b"; }
 { file = "/3"; value = "z"; }
 { file = "/4"; value = mkOverride 10 "d"; }
   ]

 yields

   [ { file = "/1"; value = "a"; }
 { file = "/4"; value = "d"; }
   ]

 Note that "z" has the default priority 100.
  */

So I used that, and it works!

  environment.variables = rec {
# other vars here
NIX_PATH = lib.mkOverride 10 "/git/hub/nixcfg"; # use anything below 100
  };

I think I even about that in the manual somewhere, but had forgotten it.
Jeff

On Sun, 5 Jul 2015 11:17:10 -0700
James Cook  wrote:

> What if you leave out the "config.environment.variables //" part (just
> environment.variables = { NIX_PATH = "/git/hub/nixcfg"; };)?
> 
> The NixOS config infrastructure is supposed to take care of the //
> part for you. I think the infinite recursion happens because
> config.environment.variables is partly based on the value you define
> for environment.variables.
> 
> James
> 
> On 5 July 2015 at 10:51, Jeffrey David Johnson  wrote:
> > Thanks, you're right that was it! I put the mkForce in while trying to
> > set NIX_PATH, then forgot to remove it after moving that to
> > interactiveShellInit instead. Man pages/environment variables back to
> > normal.
> >
> > That reminds me though, is there a way to force NIX_PATH while leaving
> > the rest in place? I tried:
> >
> > { config, ... }:
> > { environment.variables = config.environment.variables // {
> > # my other vars here
> > NIX_PATH = "/git/hub/nixcfg";
> >   };
> > }
> >
> > But it causes infinite recursion. I imagine there's a special hook
> > or override pattern for that?
> > Jeff
> >
> > On Sat, 4 Jul 2015 18:20:20 -0700
> > James Cook  wrote:
> >
> >> On 4 July 2015 at 09:24, Jeffrey David Johnson  wrote:
> >> > I'm having the same issue described here on the Gentoo forums:
> >> >
> >> > https://forums.gentoo.org/viewtopic-t-670013.html
> >> >
> >> > Man pages are hard to read because they're full of control characters. 
> >> > For example:
> >> >
> >> > NIXOS-REBUILD(8)  NixOS Reference Pages  
> >> > NIXOS-REBUILD(8)
> >> >
> >> > ESC[1mNAMEESC[0m
> >> >nixos-rebuild - reconfigure a NixOS machine
> >> >
> >> > ESC[1mSYNOPSISESC[0m
> >> >ESC[1mnixos-rebuild ESC[22m{ESC[1mswitch ESC[22m| ESC[1mboot 
> >> > ESC[22m| ESC[1mtest
> >>

Re: [Nix-dev] Garbled man pages/incomplete environment

2015-07-05 Thread Jeffrey David Johnson
Thanks, you're right that was it! I put the mkForce in while trying to
set NIX_PATH, then forgot to remove it after moving that to
interactiveShellInit instead. Man pages/environment variables back to
normal.

That reminds me though, is there a way to force NIX_PATH while leaving
the rest in place? I tried:

{ config, ... }:
{ environment.variables = config.environment.variables // {
# my other vars here
NIX_PATH = "/git/hub/nixcfg";
  };
}

But it causes infinite recursion. I imagine there's a special hook
or override pattern for that?
Jeff

On Sat, 4 Jul 2015 18:20:20 -0700
James Cook  wrote:

> On 4 July 2015 at 09:24, Jeffrey David Johnson  wrote:
> > I'm having the same issue described here on the Gentoo forums:
> >
> > https://forums.gentoo.org/viewtopic-t-670013.html
> >
> > Man pages are hard to read because they're full of control characters. For 
> > example:
> >
> > NIXOS-REBUILD(8)  NixOS Reference Pages  
> > NIXOS-REBUILD(8)
> >
> > ESC[1mNAMEESC[0m
> >nixos-rebuild - reconfigure a NixOS machine
> >
> > ESC[1mSYNOPSISESC[0m
> >ESC[1mnixos-rebuild ESC[22m{ESC[1mswitch ESC[22m| ESC[1mboot 
> > ESC[22m| ESC[1mtest
> > ESC[22m| ESC[1mbuild ESC[22m| ESC[1mdry-build ESC[22m| ESC[1mdry-activate 
> > ESC[22m|
> > ...
> >
> > I expect it's a problem with my environment variables, so
> > here's my profile.nix which I import into configuration.nix:
> >
> > with import ;
> >
> > {
> >   programs.bash = {
> > enableCompletion = true;
> > # promptInit = "PS1=\"# \"";
> >   };
> >
> >   # replaces traditional xinitrc
> >   services.xserver.displayManager.sessionCommands = ''
> > export EDITOR=qvim # why no gvim?
> > xsetroot -cursor_name left_ptr &
> > [[ -a ~/.fehbg ]] && eval $(cat ~/.fehbg)
> > unclutter -idle 1 &
> > eval "$(ssh-agent -s)" &
> >   '';
> >
> >   environment.variables = lib.mkForce rec {
> > EDITOR   = "vim" ;
> > TERM = TERMINAL;
> > TERMINAL = "xfce4-terminal";
> >   };
> >
> >   # this gets reset if in environment.variables for some reason
> >   environment.interactiveShellInit = ''
> > export NIX_PATH=/git/hub/nixcfg
> >   '';
> >
> >   # TODO why can't nix-env find things on the regular NIX_PATH?
> >   environment.shellAliases = {
> > "nix-env" = "nix-env -f ${}";
> >   };
> > }
> >
> > As you can see I also have issues setting up NIX_PATH.
> > The current kludgy solution is working OK, but if you know
> > how to clean it up please mention that too! My worry is
> > that I've deleted all the environment variables not
> > mentioned here including some important ones, and man
> > pages are just the first thing I noticed.
> >
> > Thanks
> > Jeff
> 
> The only thing that comes to mind: environment.varibles = lib.mkForce
> ... looks suspicious to me. Does it work without the mkForce?
> 
> (If environment.variables is like other configuration variables I've
> met, then mkForce means discard whatever the defaults are, and leaving
> out mkForce means append the values you specify to whatever the
> defaults are.)
> 
> You could always start commenting out parts of the configuration and
> observing the changes, but of course that's tedious. Maybe using
> nixos-rebuild build-vm could help.
> 
> James
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Garbled man pages/incomplete environment

2015-07-04 Thread Jeffrey David Johnson
I'm having the same issue described here on the Gentoo forums:

https://forums.gentoo.org/viewtopic-t-670013.html

Man pages are hard to read because they're full of control characters. For 
example:

NIXOS-REBUILD(8)  NixOS Reference Pages  
NIXOS-REBUILD(8)

ESC[1mNAMEESC[0m
   nixos-rebuild - reconfigure a NixOS machine

ESC[1mSYNOPSISESC[0m
   ESC[1mnixos-rebuild ESC[22m{ESC[1mswitch ESC[22m| ESC[1mboot ESC[22m| 
ESC[1mtest 
ESC[22m| ESC[1mbuild ESC[22m| ESC[1mdry-build ESC[22m| ESC[1mdry-activate 
ESC[22m|
...

I expect it's a problem with my environment variables, so
here's my profile.nix which I import into configuration.nix:

with import ;

{
  programs.bash = {
enableCompletion = true;
# promptInit = "PS1=\"# \"";
  };

  # replaces traditional xinitrc
  services.xserver.displayManager.sessionCommands = ''
export EDITOR=qvim # why no gvim?
xsetroot -cursor_name left_ptr &
[[ -a ~/.fehbg ]] && eval $(cat ~/.fehbg)
unclutter -idle 1 &
eval "$(ssh-agent -s)" &
  '';

  environment.variables = lib.mkForce rec {
EDITOR   = "vim" ;
TERM = TERMINAL;
TERMINAL = "xfce4-terminal";
  };

  # this gets reset if in environment.variables for some reason
  environment.interactiveShellInit = ''
export NIX_PATH=/git/hub/nixcfg
  '';

  # TODO why can't nix-env find things on the regular NIX_PATH?
  environment.shellAliases = {
"nix-env" = "nix-env -f ${}";
  };
}

As you can see I also have issues setting up NIX_PATH.
The current kludgy solution is working OK, but if you know
how to clean it up please mention that too! My worry is
that I've deleted all the environment variables not
mentioned here including some important ones, and man
pages are just the first thing I noticed.

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


Re: [Nix-dev] /etc/nixos/configuration.nix vs ~/.nixpkgs/config.nix

2015-06-29 Thread Jeffrey David Johnson
I do that too, here's my repo (of course also messy):
https://github.com/jefdaj/nixcfg

In particular the installDotfiles function here:
https://github.com/jefdaj/nixcfg/blob/master/modules/util.nix

works for probably half of the dotfiles I wanted to install. The rest were
more complicated and are scattered around in their own nix files. It's
messy, but it definitely does work. I have all my important stuff installed
this way on a couple different computers now.
Jeff

On Mon, 29 Jun 2015 10:38:12 -0600
Jonathan Glines  wrote:

> 2015-06-29 8:20 GMT-06:00 Kamil Chmielewski :
> > Hi,
> >
> > I'm trying to setup NixOS on my laptop and I feel really confused with this
> > 2 config files.
> > I would like to have base system configuration like hardware and system
> > services in /etc/nixos and other software and user configuration in
> > ~/.nixpkgs.
> > I'm stuck on custom gtk theme now. I don't want to install my gtk theme
> > system wide, but in my user scope only. I searched everywhere and I can't
> > find an example ~/.nixpkgs that will setup my env analogous to Deian conf:
> > 1. gtk theme in ~/.themes
> > 2. custom ~/.gtkrc-2.0
> >
> > I had a repo of dotiles for debian with many other things like .gitconfig,
> > .vimrc, .profile 
> > How to rewrite it to NixOS?
> 
> Like Eelco said, there's no proper support for dotfiles in home
> directories *yet*.
> 
> But I've been using system.activationScripts as a hack to get it
> working anyway. Inside my configuration.nix looks something like this:
> 
>  system.activationScripts =
>   {
> # Configure various dotfiles.
> dotfiles = stringAfter [ "users" ]
> ''
>   cd /home/auntieneo
>   ln -fs ${./dotfiles/vimrc} .vimrc
> '';
>   };
> 
> What happens here is NixOS tells systemd to run an activation script
> on every boot (and every time you nixos-rebuild switch) after it
> creates the user accounts. It's a bash script with Nix expressions, so
> there's the potential to do a lot of very clever things. Dotfiles show
> up as read-only symlinks in my home directory, which works very well
> for 99% of programs.
> 
> Unfortunately, this is inside configuration.nix and not ~/.nixpkgs.
> I'm not too happy about that, but when NixOS gets around to managing
> user dotfiles I'm sure that will change.
> 
> My dotfiles can be found on github (warning: very messy):
> https://github.com/auntieNeo/nixrc/blob/dc744edd/configuration-common.nix#L60-L114
> 
> I'm pretty sure a few other people do this the same way, since I
> originally discovered this method on this mailing list.
> 
> Regards,
> Jonathan
> ___
> 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] Using R with Bioconductor

2015-06-18 Thread Jeffrey David Johnson
Nope just that really, but it could use a little more explanation: when
downloading the new packages I found them to be unreliable. That is
each time some of the curl calls would fail but it would be different
ones. I think that might have to do with my heavily refactored
generate-r-packages.R, or with my university internet. It works slower
but more reliably from my laptop off campus. Best guess is that
either I triggered some kind of limit on concurrent or daily downloads
from bioconductor.statistik.tu-dortmund.de, or I was downloading faster
than my hard drive could write (such a first world problem!). I
partially fixed it by running the script repeatedly.

I'd also like to write something short in the manual/wiki.
Embarassingly I haven't figured out how to write/build my own R
packages using buildRPackage yet though. It never came up because my
current project is a mess of R + python + bash code glued together with
makefiles. But any of the pre-hashed R packages can be installed or used
in a shell like you'd expect:

with import  {};
stdenv.mkDerivation {
  buildInputs = with rPackages; [ package1 package2 ... ];
}

Jeff

On Thu, 18 Jun 2015 14:04:41 +0200
Rok Garbas  wrote:

> Quoting Jeffrey David Johnson (2015-06-18 06:20:57)
> > Wonderful, thanks for pushing it forward! I did some more on it but
> > then got sidetracked by grad school and kind of dropped the ball. There
> > is one more thing though...
> > 
> > After splitting CRAN and BIOC packages up, I discovered that
> > many of the BIOC ones require other Annotation or Experiment data
> > packages. So I added those too. They're hosted on the same bioconductor
> > servers but under different subdirectories. I added them as separate
> > files because it was easier with my existing code, but hoped to
> > integrate them into the same BIOC file and update the broken packages
> > list before doing a pull request. Then I didn't get around to it.
> > 
> > This is a working implementation (just missing the updated broken
> > list) that shows the new subdirectories in default.nix around line 50:
> > 
> > https://github.com/jefdaj/nixpkgs/tree/master/pkgs/development/r-modules
> > 
> > Any chance that could make it into the release too?
> > Jeff
> > 
> 
> Hi Jeffrey,
> 
> This really looks nice, I would love to see this in 15.06.
> 
> I see 3 TODO items here [1] I we want to remove them. Is there anythigs left 
> on
> you todo list?
> 
> And maybe R language should get a short section in the manual [2] since there
> is no mention of language support of R. Instructions how to update the manual
> are here [3].
> 
> 
> 
> [1] 
> https://github.com/NixOS/nixpkgs/compare/master...jefdaj:master#diff-789598f937b7fe2f8e737d7e3f4e206dR3
> [2] http://nixos.org/nixpkgs/manual/#chap-language-support
> [3] https://nixos.org/wiki/Contributing_to_Nix_documentation
> 
> 
> 
> --
> Rok Garbas - http://www.garbas.si
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Using R with Bioconductor

2015-06-17 Thread Jeffrey David Johnson
Wonderful, thanks for pushing it forward! I did some more on it but
then got sidetracked by grad school and kind of dropped the ball. There
is one more thing though...

After splitting CRAN and BIOC packages up, I discovered that
many of the BIOC ones require other Annotation or Experiment data
packages. So I added those too. They're hosted on the same bioconductor
servers but under different subdirectories. I added them as separate
files because it was easier with my existing code, but hoped to
integrate them into the same BIOC file and update the broken packages
list before doing a pull request. Then I didn't get around to it.

This is a working implementation (just missing the updated broken
list) that shows the new subdirectories in default.nix around line 50:

https://github.com/jefdaj/nixpkgs/tree/master/pkgs/development/r-modules

Any chance that could make it into the release too?
Jeff

On Wed, 17 Jun 2015 23:23:06 +0200
Peter Simons  wrote:

> Hi Jeffrey,
> 
> we now have full Bioconductor support in "master". According to
> http://hydra.cryp.to/jobset/nixpkgs/r-updates, we can build about
> 7000 packages for R in Nix. Thank you very much for your help!
> 
> Best regards,
> Peter
> 
> ___
> 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] funding nixos documentation

2015-06-03 Thread Jeffrey David Johnson
Yeah I would do that too. When I said I couldn't I thought we were
talking about job-level money. And https://www.bountysource.com/ looks
like a great setup. They even take bitcoin! (May not matter to
anyone else...)
Jeff

On Wed, 3 Jun 2015 18:51:14 -0500
Patrick Wheeler  wrote:

> I have thought about opening small bounties for nixos.  Probably only 20-50
> dollars a month though.  Not clear how far that would go though.
> 
> On Wed, Jun 3, 2015 at 2:37 PM, Tomasz Kontusz 
> wrote:
> 
> >
> > On 06/03/2015 08:21 PM, Jeffrey David Johnson wrote:
> > > Oops, replying to the whole list now.
> > >
> > > Begin forwarded message:
> > >
> > > Date: Wed, 3 Jun 2015 11:20:10 -0700
> > > From: Jeffrey David Johnson 
> > > To: Joachim Schiele 
> > > Subject: Re: [Nix-dev] funding nixos documentation
> > >
> > >
> > > I like the idea but can't personally pay for it :(
> > >
> > > I see you have a paper on <http://nixos.org/docs/papers.html>
> > > comparing Nix to other package managers. I think that would be a great
> > > topic for documentation! Maybe a series of short tutorials for people
> > > coming from Debian, Arch, Gentoo, brew on OSX, etc.
> > >
> > > Also, long shot idea: we could put together a list of bounties. Pledge
> > > amounts toward particular fixes/goals and then when someone
> > > accomplishes them they post a paypal/bitcoin address to get paid. I'm
> > > not sure how to make it binding or pay up front or resolve disputes
> > > though.
> > Actually there are already systems for bounties
> > (https://www.bountysource.com/ is one) - do people here have any
> > experience with those?
> > Would it make sense to have one of such platforms endorsed by nixos.org?
> >
> > > Jeff
> > >
> > > On Wed, 03 Jun 2015 16:43:07 +0200
> > > Joachim Schiele  wrote:
> > >
> > >> hey,
> > >>
> > >> if someone is willing to pay me for nixos documentation updates i would
> > >> love to do some contribution(s)/rework.
> > >>
> > >> just let me know if you are interested.
> > >>
> > >> goals i consider importatnt:
> > >> - nix/nixpkgs documentation
> > >> - nix-shell examples
> > >> - create a nix tutorial
> > >> - create an offline version of the wiki
> > >> - create an offline version of package/option search
> > >>
> > >> please contact me if you have interest in paying me for such things.
> > >>
> > >> regards,
> > >> joachim schiele
> > >>
> > >> ___
> > >> 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
> >
> 
> 
> 
> -- 
> Patrick Wheeler
> patrick.john.whee...@gmail.com
> patrick.whee...@colorado.edu
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] funding nixos documentation

2015-06-03 Thread Jeffrey David Johnson
Oops, replying to the whole list now.

Begin forwarded message:

Date: Wed, 3 Jun 2015 11:20:10 -0700
From: Jeffrey David Johnson 
To: Joachim Schiele 
Subject: Re: [Nix-dev] funding nixos documentation


I like the idea but can't personally pay for it :(

I see you have a paper on <http://nixos.org/docs/papers.html>
comparing Nix to other package managers. I think that would be a great
topic for documentation! Maybe a series of short tutorials for people
coming from Debian, Arch, Gentoo, brew on OSX, etc.

Also, long shot idea: we could put together a list of bounties. Pledge
amounts toward particular fixes/goals and then when someone
accomplishes them they post a paypal/bitcoin address to get paid. I'm
not sure how to make it binding or pay up front or resolve disputes
though.

Jeff

On Wed, 03 Jun 2015 16:43:07 +0200
Joachim Schiele  wrote:

> hey,
> 
> if someone is willing to pay me for nixos documentation updates i would
> love to do some contribution(s)/rework.
> 
> just let me know if you are interested.
> 
> goals i consider importatnt:
> - nix/nixpkgs documentation
> - nix-shell examples
> - create a nix tutorial
> - create an offline version of the wiki
> - create an offline version of package/option search
> 
> please contact me if you have interest in paying me for such things.
> 
> regards,
> joachim schiele
> 
> ___
> 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] Best practices for replacing channels with my own package set?

2015-06-01 Thread Jeffrey David Johnson
Hmm I have that too but it doesn't work. Is yours like this (with myhead
for mypkgs)?

$ ls ~/.nix-defexpr/ -al
...
lrwxrwxrwx  1 jefdaj users   22 Apr 17 10:46 mypkgs -> /path/to/mypkgs
...

I think I found the other/main problem: `NIX_PATH` isn't
sticking during `nixos-rebuild` because I put it in
`environment.variables` instead of `environment.sessionVariables`. I
guess it's normally set in both and `sessionVariables` takes priority?
If I set it in the shell with `export NIX_PATH=...` then `nix-env`
works again. It also works when placed in `sessionVariables` as Herwig
said, but that causes other havoc (messing up the locale etc.):

with import ;
{
  ...
  environment.sessionVariables = lib.mkForce {
"NIX_PATH" = "/path/to/mypkgs";
  };
  ...
}

Am I looking for a way to union that with the defaults or maybe
`mkForce` a single attribute?
Jeff

On Mon, 1 Jun 2015 21:37:01 -0700
James Cook  wrote:

> I have a symlink from ~/.nix-defexpr/myhead to the nixpkgs tree I want to use.
> 
> James
> 
> On 1 June 2015 at 17:35, Jeffrey David Johnson  wrote:
> > Nevermind, that sets NIX_PATH but nix-env still errors out with:
> >
> > nix-env: src/libexpr/eval.hh:57: void nix::Bindings::push_back(const 
> > nix::Attr&): Assertion `size_ < capacity' failed.
> > Aborted
> >
> > Unless explicitly given the -f option.
> > Jeff
> >
> > On Tue, 2 Jun 2015 00:31:35 +0200
> > Herwig Hochleitner  wrote:
> >
> >> I set NIX_PATH in environment.sessionVariables (with an mkForce, to
> >> override the builtin one). nix-env and everything else should pick it up,
> >> that way, since that's the location it's predefined.
> > ___
> > 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] Best practices for replacing channels with my own package set?

2015-06-01 Thread Jeffrey David Johnson
Nevermind, that sets NIX_PATH but nix-env still errors out with:

nix-env: src/libexpr/eval.hh:57: void nix::Bindings::push_back(const 
nix::Attr&): Assertion `size_ < capacity' failed.
Aborted

Unless explicitly given the -f option.
Jeff

On Tue, 2 Jun 2015 00:31:35 +0200
Herwig Hochleitner  wrote:

> I set NIX_PATH in environment.sessionVariables (with an mkForce, to
> override the builtin one). nix-env and everything else should pick it up,
> that way, since that's the location it's predefined.​
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Best practices for replacing channels with my own package set?

2015-06-01 Thread Jeffrey David Johnson
Thanks, the mkForce was what I was missing!
Jeff

On Tue, 2 Jun 2015 00:31:35 +0200
Herwig Hochleitner  wrote:

> I set NIX_PATH in environment.sessionVariables (with an mkForce, to
> override the builtin one). nix-env and everything else should pick it up,
> that way, since that's the location it's predefined.​
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Best practices for replacing channels with my own package set?

2015-06-01 Thread Jeffrey David Johnson
I'd like all the nix tools to reference my package repository, which is
called mypkgs and re-exports nixpkgs with some custom ones added. I
base it on the latest nixos-unstable revision so there should be
binaries available.

Currently I set NIX_PATH using `environment.interactiveShellInit`. That
seems to work for everything except nix-env, so I alias it to `nix-env
-f /path/to/mypkgs`. But I'm a little worried there might be parts of
the system still depending on ~/.nix-defexpr, /etc/nixos etc. Anything
else I should be doing?
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Using R with Bioconductor

2015-05-29 Thread Jeffrey David Johnson
Finally got around to writing it!

https://github.com/NixOS/nixpkgs/compare/master...jefdaj:bioc-pullreq-twofiles

I'm getting an error when installing a Bioconductor package with CRAN
dependency though... is that just me? I think they should be able to
find each other since the two sets get unioned.
Jeff

On Tue, 26 May 2015 09:31:35 -0700
Jeffrey David Johnson  wrote:

> Sure that sounds good. It would make storing the mirror type for each
> package unneccesary too. I'll see if I can set it up later today so
> the script takes 'cran' or 'bioc' as an argument and reads/writes
> cran-packages.nix or bioc-packages.nix, then default.nix can read both
> sets and map the right urls onto them before combining.
> Jeff
> 
> On Tue, 26 May 2015 10:35:21 +0200
> Peter Simons  wrote:
> 
> > Hi Jeffrey,
> > 
> >  > https://github.com/NixOS/nixpkgs/compare/master...jefdaj:bioc-pullreq
> > 
> > this looks good to me. Thank you very much for figuring this out!
> > 
> > The only thing I'd prefer is to have packages from CRAN and Bioconductor
> > in two separate files so that it's possible to re-generate them
> > separately. Both files should be imported into one attribute set called
> > rPackages, though, that's clear.
> > 
> >  > There might be conflicts between the Bioconductor and CRAN release
> >  > schedules.
> > 
> > I don't believe there's any release schedule. People just upload new
> > packages to the repository whenever they've finished a new version. I
> > doubt that's a coordinated effort.
> > 
> > Best regards,
> > Peter
> > 
> > ___
> > 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] Shape configuration.nix differently

2015-05-28 Thread Jeffrey David Johnson
Isn't that the same as

```
{
  imports = [
./hardware-configuration.nix
./boot/grub.nix
  ];
}
```

? I think you can still access config and pkgs from each file.
Jeff

On Fri, 29 May 2015 01:55:34 +0200
Nicolas Pierron  wrote:

> I am not sure to understand your
> 
> On Fri, May 29, 2015 at 1:39 AM, Manuel Pages
>  wrote:
> > Hey, I'm working on a differently-shaped /etc/nixos/configuration.nix.
> >
> > My vision is to shape it like this:
> >
> > ```
> > { config, pkgs, ... }:
> > pkgs.lib.fold (x: y: pkgs.lib.mergeAttrs x y) {} [
> >   import ./hardware-configuration.nix { pkgs = pkgs; config = config; }
> >   import ./boot/grub.nix { device = "/dev/sda"; }
> >   # ...
> > ]
> > ```
> 
> The problem that you see is that recent modifications of the module
> system change pkgs to be the result of the configuration, instead of
> being the one from your system.
> This change as a side-effect of making pkgs.lib cause infinite recursions.
> 
> Then, I am not completely sure to understand what you want to achieve
> which cannot be done with the module system?
> 
> -- 
> Nicolas Pierron
> http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
> ___
> 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] Using R with Bioconductor

2015-05-26 Thread Jeffrey David Johnson
Sure that sounds good. It would make storing the mirror type for each
package unneccesary too. I'll see if I can set it up later today so
the script takes 'cran' or 'bioc' as an argument and reads/writes
cran-packages.nix or bioc-packages.nix, then default.nix can read both
sets and map the right urls onto them before combining.
Jeff

On Tue, 26 May 2015 10:35:21 +0200
Peter Simons  wrote:

> Hi Jeffrey,
> 
>  > https://github.com/NixOS/nixpkgs/compare/master...jefdaj:bioc-pullreq
> 
> this looks good to me. Thank you very much for figuring this out!
> 
> The only thing I'd prefer is to have packages from CRAN and Bioconductor
> in two separate files so that it's possible to re-generate them
> separately. Both files should be imported into one attribute set called
> rPackages, though, that's clear.
> 
>  > There might be conflicts between the Bioconductor and CRAN release
>  > schedules.
> 
> I don't believe there's any release schedule. People just upload new
> packages to the repository whenever they've finished a new version. I
> doubt that's a coordinated effort.
> 
> Best regards,
> Peter
> 
> ___
> 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] Using R with Bioconductor

2015-05-25 Thread Jeffrey David Johnson
OK, turns out it's not so bad! We can skip biocLite and install packages
directly, same as from CRAN. Draft changes here:

https://github.com/NixOS/nixpkgs/compare/master...jefdaj:bioc-pullreq

Opinions? I considered splitting off a separate
bioc-modules folder, but then I noticed the majority of "broken" R
packages are just missing Bioconductor dependencies and decided the two
aren't really separate. Plus it would be a lot of duplicated code, some
of which I don't understand well enough to maintain.

There might be conflicts between the Bioconductor and CRAN release
schedules. I think a unified set of packages could require holding back
from upgrading to the latest CRAN releases on occasion, so if that's a
big problem maybe we do need two sets of packages (current CRAN,
previous CRAN + current Bioconductor). Anyone familiar enough with
Bioconductor to say for sure? Should I go ahead and make a pull
request?

I've attached the bash script I made to list remaining dependencies.
After I ran it I had to go through and manually correct some things it
doesn't pick up, like packages that exist but are known not to build.

Jeff

On Sun, 8 Mar 2015 12:00:27 -0700
Jeffrey David Johnson  wrote:

> Do any of you guys/gals use R and Bioconductor?
> 
> The only page I can find related to setting it up is 
> <https://nixos.org/wiki/R>.
> Bioconductor is a whole additional ecosystem on top of R/CRAN,
> with its own installer. You normally use it like:
> 
> source("http://bioconductor.org/biocLite.R";)
> biocLite("PackageName")
> 
> They explain why at <http://bioconductor.org/install/#why-biocLite>.
> How hard would it be to package that using Nix?
> Thanks
> Jeff


list-still-broken.sh
Description: Binary data
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Python packages with __future__ imports broken by wrapper?

2015-05-21 Thread Jeffrey David Johnson
I'm using nixpkgs commit 2d8cfe76a9e4f05e391d30f1654d45dee5993b8a,
which was the newest on nixos-unstable channel about a month ago (I'm
in the process of updating to the newest unstable, but having issues
with some changes I made to the R packages)
Jeff

On Thu, 21 May 2015 18:15:54 +0200
Domen Kožar  wrote:

> Are you using unstable branch or 14.12?
> 
> I think we'll need to drop use of sed and go with Python AST parsing for
> injecting program name.
> 
> On Thu, May 21, 2015 at 6:11 PM, Jeffrey David Johnson 
> wrote:
> 
> > I installed python27Packages.googlecl, and when running `google` it says:
> >
> >   File
> > "/nix/store/1ksk91s0kd1sv2clrkwcvzcmr67smgps-python2.7-googlecl-0.9.14/bin/.google-wrapped",
> > line 45
> > from __future__ import with_statement
> > SyntaxError: from __future__ imports must occur at the beginning of the
> > file
> >
> > Indeed, that file has 44 lines of other stuff first that looks like they
> > were added by a wrapper script:
> >
> > #!/nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python2.7
> > #
> > # Copyright (C) 2010 Google Inc.
> > #
> > # Licensed under the Apache License, Version 2.0 (the "License");
> > # you may not use this file except in compliance with the License.
> > # You may obtain a copy of the License at
> > #
> > #  http://www.apache.org/licenses/LICENSE-2.0
> > #
> > # Unless required by applicable law or agreed to in writing, software
> > # distributed under the License is distributed on an "AS IS" BASIS,
> > # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > # See the License for the specific language governing permissions and
> > # limitations under the License.
> >
> >
> > import sys; sys.argv[0] = 'google'
> > """Main function for the Google command line tool, GoogleCL.
> >
> > This program provides some functionality for a number of Google services
> > from
> > the command line.
> >
> > Example usage (omitting the initial "./google"):
> >   # Create a photo album with tags "Vermont" and name "Summer Vacation
> > 2009"
> >   picasa create -n "Summer Vacation 2009" -t Vermont
> > ~/photos/vacation2009/*
> >
> >   # Post photos to an existing album
> >   picasa post -n "Summer Vacation 2008" ~/old_photos/*.jpg
> >
> >   # Download another user's albums whose titles match a regular expression
> >   picasa get --user my.friend.joe --name ".*computer.*"
> > ~/photos/joes_computer
> >
> >   # Delete some posts you accidentally put up
> >   blogger delete -n "Silly post, number [0-9]*"
> >
> >   # Post your latest film endeavor to YouTube
> >   youtube post --category Film --tag "Jane Austen, zombies"
> > ~/final_project.mp4
> >
> > Some terminology in use:
> >   service: The Google service being accessed (e.g. Picasa, Blogger,
> > YouTube).
> >   task: What the client wants done by the service (e.g. post, get, delete).
> >
> > """
> > from __future__ import with_statement
> >
> > __author__ = 'tom.h.mil...@gmail.com (Tom Miller)'
> > import glob
> > import logging
> > import optparse
> >
> >
> > I guess we need to move this line below any __future__ statements:
> >
> > import sys; sys.argv[0] = 'google'
> >
> > According to https://docs.python.org/2/reference/simple_stmts.html#future
> > the rest should be OK:
> >
> > A future statement must appear near the top of the module. The only lines
> > that can appear before a future statement are:
> >
> > the module docstring (if any),
> > comments,
> > blank lines, and
> > other future statements.
> >
> > Jeff
> > ___
> > 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] Python packages with __future__ imports broken by wrapper?

2015-05-21 Thread Jeffrey David Johnson
I installed python27Packages.googlecl, and when running `google` it says:

  File 
"/nix/store/1ksk91s0kd1sv2clrkwcvzcmr67smgps-python2.7-googlecl-0.9.14/bin/.google-wrapped",
 line 45
from __future__ import with_statement
SyntaxError: from __future__ imports must occur at the beginning of the file

Indeed, that file has 44 lines of other stuff first that looks like they were 
added by a wrapper script:

#!/nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python2.7
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import sys; sys.argv[0] = 'google'
"""Main function for the Google command line tool, GoogleCL.

This program provides some functionality for a number of Google services from
the command line.

Example usage (omitting the initial "./google"):
  # Create a photo album with tags "Vermont" and name "Summer Vacation 2009"
  picasa create -n "Summer Vacation 2009" -t Vermont ~/photos/vacation2009/*

  # Post photos to an existing album
  picasa post -n "Summer Vacation 2008" ~/old_photos/*.jpg

  # Download another user's albums whose titles match a regular expression
  picasa get --user my.friend.joe --name ".*computer.*" ~/photos/joes_computer

  # Delete some posts you accidentally put up
  blogger delete -n "Silly post, number [0-9]*"

  # Post your latest film endeavor to YouTube
  youtube post --category Film --tag "Jane Austen, zombies" ~/final_project.mp4

Some terminology in use:
  service: The Google service being accessed (e.g. Picasa, Blogger, YouTube).
  task: What the client wants done by the service (e.g. post, get, delete).

"""
from __future__ import with_statement

__author__ = 'tom.h.mil...@gmail.com (Tom Miller)'
import glob
import logging
import optparse


I guess we need to move this line below any __future__ statements:

import sys; sys.argv[0] = 'google'

According to https://docs.python.org/2/reference/simple_stmts.html#future
the rest should be OK:

A future statement must appear near the top of the module. The only lines that 
can appear before a future statement are:

the module docstring (if any),
comments,
blank lines, and
other future statements.

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


[Nix-dev] R package name can't be used in variable substitution?

2015-05-20 Thread Jeffrey David Johnson
I put together an example package that generates a bash script:

# default.nix
with import  {};
stdenv.mkDerivation {
  name = "varSubTest";
  src = ./.;
  inherit R; rByAnotherName = R;
  builder = ./builder.sh;
}

# builder.sh
#!/usr/bin/env bash
source $stdenv/setup
mkdir -p $out/bin
substituteAll $src/varSubTest.sh $out/bin/varSubTest
chmod +x $out/bin/varSubTest

# varSubTest.sh
#!/usr/bin/env bash
echo "R is substituted with @R@"
echo "rByAnotherName is substituted with @rByAnotherName@"

If you run `nix-build && ./result/bin/varSubTest`, you'll see that @R@ is 
skipped.
Is there a restriction that single uppercase letters can't be used as variable 
names?
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] How to bootstrap a server using Nixops?

2015-05-01 Thread Jeffrey David Johnson
On Fri, 1 May 2015 08:46:14 +
Rob Vermaas  wrote:

> Hi Jeff,
> 
> 
> On Thu, Apr 30, 2015 at 11:17 PM, Jeffrey David Johnson 
> wrote:
> 
> > It's possible I'm getting the wrong idea about what nixops is for, but I
> > used
> > it to set up an Amazon EC2 instance with the idea of logging into the
> > server
> > and administering it using local commands afterward.
> 
> 
> That's an interesting and unexpected usecase of nixops. I wouldn't use
> nixops at all if you plan on doing this. Why not just start instance in the
> Amazon AWS Console or using the command line tools of AWS? (for ami's see
> https://nixos.org/wiki/NixOS_on_Amazon_EC2)

You're right that looks more like what I wanted! Sorry just didn't see
it before. I'll post my scripts below for clarification but don't worry
about troubleshooting them. I wonder if the NixOps manual should
include a link to that page? Something like "If you just want to
install NixOS on the server, see here instead". It's the kind of
distinction, like installing the OS itself to a USB drive vs installing
the LiveCD installer, that seems obvious in hindsight but new
people might miss.

> > The initial install goes
> > fine. Afterward I clone my nixcfg repo (including nixpkgs submodule) and
> > try to
> > set it up the way I would a physical machine, by copying everything from
> > /etx/nixos/* into nixcfg/configs/cyno.nix and modifying it to
> > point inside the repo:
> >
> > { config, pkgs, ... }:
> >
> > {
> >   imports = [
> > ../nixpkgs/nixos/modules/virtualization/amazon-config.nix
> >   ];
> >   ec2.hvm = true;
> >   services.journald.rateLimitBurst = 0;
> > }
> >
> >
> > When I do a `nixos-rebuild` (part of install.sh) though, it gives this
> > error:
> >
> > [root@cyno:~/nixcfg]# ./install.sh test
> > building Nix...
> > error: getting status of
> > ‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No
> > such file or directory
> > (use ‘--show-trace’ to show detailed location information)
> > error: getting status of
> > ‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No
> > such file or directory
> > (use ‘--show-trace’ to show detailed location information)
> > building the system configuration...
> > error: getting status of
> > ‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No
> > such file or directory
> > (use ‘--show-trace’ to show detailed location information)
> >
> > Now I notice something strange:
> > /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix
> > exists, but
> > `ls` throws an error when listing it:
> >
> > ls /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix
> > ls: cannot access
> > /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix: No
> > such file or directory
> >
> > If I approach it "slowly" by listing /root/nixcfg, then
> > /root/nixcfg/nixpkgs,
> > all the way to the full path it *does* work. I googled around a little and
> > according to this:
> >
> > http://superuser.com/questions/446280/no-such-file-or-directory
> >
> > The error can also mean a missing dynamically linked library. So I tried
> > ldd as
> > directed (though I don't understand the output), and got this:
> >
> > ldd $(which ls)
> > linux-vdso.so.1 (0x7fff01dec000)
> > libacl.so.1 =>
> > /nix/store/6mz0jhl389h7panazs5sayrydajia1s2-acl-2.2.52/lib/libacl.so.1
> > (0x7f55d0f54000)
> > libc.so.6 =>
> > /nix/store/93zfs0zzndi7pkjkjxawlafdj8m90kg5-glibc-2.20/lib/libc.so.6
> > (0x7f55d0bb7000)
> > libattr.so.1 =>
> > /nix/store/ndszpck395bi55jnz50ny99y4pvj6dqn-attr-2.4.47/lib/libattr.so.1
> > (0x7f55d09b3000)
> >
> > /nix/store/93zfs0zzndi7pkjkjxawlafdj8m90kg5-glibc-2.20/lib/ld-linux-x86-64.so.2
> > (0x7f55d115c000)
> >
> > Anyway I think there's something wrong with how the system is set up, but
> > not
> > sure what. Is there a correct way to bootstrap it to the point of using
> > the same config as my other machines?
> >
> 
> Can you perhaps show us the contents of install.sh? Can you give us the AMI
> that was used (see AWS Console or commandline tools) ? Also, how did you
> copy the contents of /etc/nixos/* to /root/nixcfg ? I have never seen this
> behavior before, and tested something similar yesterday successfully.

install.sh is just a wrapper to point nixos-reb

[Nix-dev] How to bootstrap a server using Nixops?

2015-04-30 Thread Jeffrey David Johnson
It's possible I'm getting the wrong idea about what nixops is for, but I used
it to set up an Amazon EC2 instance with the idea of logging into the server
and administering it using local commands afterward. The initial install goes
fine. Afterward I clone my nixcfg repo (including nixpkgs submodule) and try to
set it up the way I would a physical machine, by copying everything from
/etx/nixos/* into nixcfg/configs/cyno.nix and modifying it to
point inside the repo:

{ config, pkgs, ... }:

{
  imports = [
../nixpkgs/nixos/modules/virtualization/amazon-config.nix
  ];
  ec2.hvm = true;
  services.journald.rateLimitBurst = 0;
}


When I do a `nixos-rebuild` (part of install.sh) though, it gives this error:

[root@cyno:~/nixcfg]# ./install.sh test
building Nix...
error: getting status of 
‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No such 
file or directory
(use ‘--show-trace’ to show detailed location information)
error: getting status of 
‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No such 
file or directory
(use ‘--show-trace’ to show detailed location information)
building the system configuration...
error: getting status of 
‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No such 
file or directory
(use ‘--show-trace’ to show detailed location information)

Now I notice something strange:
/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix exists, but
`ls` throws an error when listing it:

ls /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix
ls: cannot access 
/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix: No such 
file or directory

If I approach it "slowly" by listing /root/nixcfg, then /root/nixcfg/nixpkgs,
all the way to the full path it *does* work. I googled around a little and
according to this:

http://superuser.com/questions/446280/no-such-file-or-directory

The error can also mean a missing dynamically linked library. So I tried ldd as
directed (though I don't understand the output), and got this:

ldd $(which ls)
linux-vdso.so.1 (0x7fff01dec000)
libacl.so.1 => 
/nix/store/6mz0jhl389h7panazs5sayrydajia1s2-acl-2.2.52/lib/libacl.so.1 
(0x7f55d0f54000)
libc.so.6 => 
/nix/store/93zfs0zzndi7pkjkjxawlafdj8m90kg5-glibc-2.20/lib/libc.so.6 
(0x7f55d0bb7000)
libattr.so.1 => 
/nix/store/ndszpck395bi55jnz50ny99y4pvj6dqn-attr-2.4.47/lib/libattr.so.1 
(0x7f55d09b3000)

/nix/store/93zfs0zzndi7pkjkjxawlafdj8m90kg5-glibc-2.20/lib/ld-linux-x86-64.so.2 
(0x7f55d115c000)

Anyway I think there's something wrong with how the system is set up, but not
sure what. Is there a correct way to bootstrap it to the point of using
the same config as my other machines?

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


Re: [Nix-dev] Haskell NG: Local packages

2015-04-28 Thread Jeffrey David Johnson
It's not specific to Haskell (and I haven't tried haskellng at all yet) but for
personal packages I have mypkgs//default.nix, and then a top-level
mypkgs/default.nix:

let
  nixpkgs = import  {};
  callPkg = nixpkgs.newScope
(  nixpkgs
// nixpkgs.haskellPackages
// nixpkgs.python27Packages
// self
);

  self = {
canonicalFilepath = callPkg ./canonical-filepath {} ;
filestore = callPkg ./filestore  {} ;
gitit = callPkg ./gitit  {} ;
igv   = callPkg ./igv{} ;
igvtools  = callPkg ./igvtools   {} ;
indentparser  = callPkg ./indentparser   {} ;
jeffkb= callPkg ./jeffkb {} ;
jeffwiki  = callPkg ./jeffwiki   {} ;
ncbi-blast= callPkg ./ncbi-blast {} ;
rPackages = callPkg ./r-modules  {} ;
scan2pdf  = callPkg ./scan2pdf   {} ;
scripts   = callPkg ./scripts{} ;
tarql = callPkg ./tarql  {} ;
tasktree  = callPkg ./tasktree   {} ;
tsync = callPkg ./tsync  {} ;
  };

  in (nixpkgs // self)

I add that to my NIX_PATH so I can `import ` anywhere to get 
overridden with the stuff I'm working on.
Jeff

On Tue, 28 Apr 2015 22:11:57 +0200
Ertugrul Söylemez  wrote:

> I believe Peter's message <87mw5qvj9x@write-only.cryp.to> could
> answer my question.  I will give it a try.
> 
> > Hello fellow Haskellers,
> >
> > I have a bunch of local Haskell packages, mostly libraries.  The package
> > X lives in the directory ``.  There are lots of direct
> > and indirect dependencies between them.  My current solution is ad hoc
> > and rather ugly.  I'm using the following hand-crafted `shell.nix` file
> > in every project:
> >
> > { pkgs ? import  {} }:
> >
> > let inherit (pkgs.haskellngPackages) callPackage;
> >
> > extPkg = path: deps:
> > (callPackage (import path) deps).override (args: args // {
> > mkDerivation = expr:
> > args.mkDerivation (expr // {
> > src = pkgs.fetchdarcs { url = path; };
> > });
> > });
> >
> > thisPkg = callPackage (import ./devel.nix) {
> > direct-dep1 = extPkg  {
> > indirect-dep1 = ...;
> > indirect-dep2 = ...;
> > };
> > direct-dep2 = extPkg  {};
> > };
> >
> > in thisPkg.env
> >
> > Do not pay too much attention to the `extPkg` function.  It just works
> > around cabal2nix' lack of support for Darcs URLs.
> >
> > My question is:  Is there a nicer and more principled way to solve this?
> > Ideally I could simply add all of my local packages in some way to my
> > `~/.nixpkgs/config.nix`.  Then they could just depend on each other
> > regularly and I wouldn't need any shell.nix hackery.  I'm guessing that
> > I need to override haskellngPackages in some way or perhaps create my
> > own using some override.
> >
> >
> > Greets,
> > Ertugrul
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] buildPythonPackage: add src to PYTHONPATH before build?

2015-04-21 Thread Jeffrey David Johnson
I'm trying to package a python application (https://github.com/dagraham/etm-tk).
I made an initial package with python2nix, but when I try to install it I get:

installing ‘python2.7-etm’
these derivations will be built:
  /nix/store/a1xn163ms6rg3w9k901lr6fga4lawqx9-python2.7-etm.drv
building path(s) ‘/nix/store/bncc469m7v8r5i11ak9my9dxdjvm6cpg-python2.7-etm’
unpacking sources
unpacking source archive 
/nix/store/jdhl79isbzapyyz6vlh22i03m9lbc00w-etm-tk-7b6ba79
source root is etm-tk-7b6ba79
patching sources
configuring
building
Traceback (most recent call last):
  File "setup.py", line 3, in 
from etmTk.v import version
ImportError: No module named etmTk.v
builder for ‘/nix/store/a1xn163ms6rg3w9k901lr6fga4lawqx9-python2.7-etm.drv’ 
failed with exit code 1
error: build of ‘/nix/store/a1xn163ms6rg3w9k901lr6fga4lawqx9-python2.7-etm.drv’ 
failed

How should I handle the setup.py importing a module from inside the package?
I imagine there's a hook somewhere where I could add it to the PYTHONPATH?
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] What am I doing wrong with ssh-substitutor-hosts?

2015-04-07 Thread Jeffrey David Johnson
Wow I feel silly. Thanks for pointing out the misspelling!
Now I get this error though:

download-via-ssh: /bin/sh: line 0: exec: bash: not found
download-via-ssh: ssh_exchange_identification: Connection closed by remote host
download-via-ssh: error: unexpected end-of-file
error: substituter ‘download-via-ssh’ died unexpectedly

If I ssh in manually bash is found fine.
Jeff

On Tue, 07 Apr 2015 11:45:12 +0200
Eelco Dolstra  wrote:

> Hi,
> 
> On 02/04/15 20:56, Jeffrey David Johnson wrote:
> 
> > I've got two computers with nixos, and I can ssh between them without a
> > password.  But if I do a nixos-rebuild with `--option ssh-substitutor-hosts
> > ` they still just download everything from cache.nixos.org. 
> 
> It's *substituter*, not substitutor.
> 
> Also, make sure you're root or a user listed in ‘trusted-users’ in nix.conf.
> 
> -- 
> 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
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] What am I doing wrong with ssh-substitutor-hosts?

2015-04-02 Thread Jeffrey David Johnson
I've got two computers with nixos, and I can ssh between them without a
password.  But if I do a nixos-rebuild with `--option ssh-substitutor-hosts
` they still just download everything from cache.nixos.org.  I think
I have the sshServe set up in my configuration.nix:

# nixServeKeys are loaded from another file keys.nix,
# and are all the same ones used for regular ssh access
nix.sshServe = { enable = true; keys = nixServeKeys; };

Is there a setting I'm missing somewhere?
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] [***SPAM***] git:// repositories in nixpkgs

2015-03-27 Thread Jeffrey David Johnson
At least on github there's always an equivalent https:// url right?

On Fri, 27 Mar 2015 12:49:04 -0400
Shea Levy  wrote:

> fetchurl has a concept of multiple urls and mirrors, I’m not sure if fetchgit 
> does but it would be nice for this use case. git:// should be preferred when 
> it is usable, but if it’s not fetchgit could fall back to an alternatively 
> specified URL.
> 
> > On Mar 27, 2015, at 12:40 PM, Serge Kosyrev <_deepf...@feelingofgreen.ru> 
> > wrote:
> > 
> > Good day, folks!
> > 
> > What is the stance on git:// repositories in nixpkgs?
> > 
> > They are generally unavailable from behind corporate firewalls.
> > 
> > One package employing this is grub, as of current master.
> > 
> > -- 
> > regards,
> > Серёга Косырев
> > ___
> > 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] Getting started with nix-build

2015-03-24 Thread Jeffrey David Johnson
Yeah I'd like to know this too. I suspect there's a flag for it but not sure 
what it would be called.

Also if you're building the latext nixpkgs from github hydra might not have 
cought up yet. I think standard practice is to stay a few commits back so can 
get binaries. I asked a semi-related question a couple days ago and Jonothan 
Glines showed me this script for checking out the latest commit that's made it 
to the unstable channel:

git branch myBranch `curl -sI http://nixos.org/channels/nixos-unstable/ | grep 
Location | perl -n -e'/([0-9a-f]{7})\/\s*$/ && print $1'`

I haven't tried it yet but looks like it might be what you want.
Jeff

On Tue, 24 Mar 2015 09:49:11 +
Oliver Matthews  wrote:

> So, I'm attempting to add a plex package. I've followed the instructions in 
> the nixpkgs manual (and cross-checked with contributing to nixpkgs on the 
> wiki). It's all fine up until I run nix-build -A - it's going to attempt to 
> build my package, but also goodly chunks of the full OS starting with glibc. 
> I could understand this if I'd specified versions of libraries not in what 
> hydra is currently building, but I've not. I suspect I'm either invoking 
> nixbuild wrong (nix-build -K --dry-run -A plex-media-server from 
> ~/src/nixpkgs) or I'm missing the nix equivalent of build-essential. Or I'm 
> missing part of the point entirely, but I would have expected the docs 
> (somewhere) to warn that attempting to run nix-build will attempt to compile 
> a full toolchain from scratch (which requires a fair amount of diskspace and 
> time).
> 
> Regards,
> Oliver
> 
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] NixOps doesn't work with EC2 anymore?

2015-03-21 Thread Jeffrey David Johnson
I'm trying to set up a server for my lab to do bioinformatics. I'm following 
the manual here:



I got to the `deploy` step but then Amazon gives me an this error:

error: EC2ResponseError: 400 Bad Request


  

  InvalidParameterCombination
  
Virtualization type 'hvm' is required for instances of type 't2.micro'.
  

  
  db2241eb-5cfe-4213-9d9c-b8b64a32fa7c


According to ,
you now need to set up a block storage device and link it to your machine 
instance.
Is there a way to do that in nixops?

In case it helps, here are my nix expressions:

# test.nix
{
  network.description = "Amazon EC2 Test 2015-03-21";
  server = { config, pkgs, ... }:
{ environment.systemPackages =
with pkgs;
with rPackages;
with pythonPackages; [
  R
  edgeR
  DESeq2
  MLSeq
  ncbi-blast
  ipython
  nix
  nix-repl
  gitFull
  tree
  vim
  less
];
};
}

# test-ec2.nix:
let
  region = "us-west-1";
  accessKeyId = "test";
  ec2 = { resources, ... }:

  {
deployment = {
  targetEnv = "ec2";
  ec2 = {
inherit region accessKeyId;
instanceType = "t2.micro";
keyPair = resources.ec2KeyPairs.my-key-pair;
# securityGroups = [ "allow-ssh" "allow-http" ];
  };
};
  };
in {
  server = ec2;
  resources.ec2KeyPairs.my-key-pair = { inherit region accessKeyId; };
}

And I launch it with:

nixops create ./test.nix test-ec2.nix -d test
nixops deploy -d test

Also sorry if I missed some old posts on this. Embarassingly, I can't figure
out how to search the mailing list archives.
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Regex in manifest breaks nix-env

2015-03-17 Thread Jeffrey David Johnson
OK so there's another problem too, but this one is
my fault and not a bug. It apparently stopped working
more than a month ago:

nix-env --list-generations
  24   2015-02-05 09:05:12   (current)

But instead of looking into the problem,
I just tried again with sudo and it worked.
I assumed it was a permissions problem.
And since then I've done `nix-collect-garbage` to recover
hard drive space. So all the other generations are
installed as root:

sudo nix-env --list-generations
  86   2015-03-08 21:50:23   
  87   2015-03-11 13:23:29   
  88   2015-03-11 18:53:20   
  89   2015-03-13 00:50:41   
  90   2015-03-13 01:04:21   
  91   2015-03-16 13:59:56   
  92   2015-03-17 11:07:19   (current)

Can I move them to my regular user account by overwriting
some or all of the files with those in /root/.nix-profile?
I'm not worried about losing installed derivations beacuse
I just use the user profile for testing and have my
long-term package lists in a separate git repo.
Jeff

On Tue, 17 Mar 2015 18:26:26 +0100
Eelco Dolstra  wrote:

> Hi,
> 
> On 17/03/15 18:11, Jeffrey David Johnson wrote:
> 
> > Hi all! My nix-env commands recently stopped working. For example if I try
> > to `nix-env -q`, it says:
> > 
> > error: syntax error, unexpected $undefined, expecting '"', at 
> > "/nix/store/ar83fv0d68frfyifz2wl1dm97m6jvxnn-env-manifest.nix":1:153
> > 
> > The contents of 
> > `/nix/store/ar83fv0d68frfyifz2wl1dm97m6jvxnn-env-manifest.nix` are:
> > 
> > [ { meta = { description = "RDF database"; downloadPage = 
> > "http://archive.apache.org/dis  t/jena/binaries/"; downloadURLRegex = 
> > "apache-jena-.*[.]tar[.]gz$"; homepage = "http://j  ena.apache.org"; 
> > license = { fullName = "Apache License 2.0"; shortName = "asl20"; spdxI  d 
> > = "Apache-2.0"; url = "http://spdx.org/licenses/Apache-2.0";; }; maintainers 
> > = [ "Micha  el Raskin <7c6f4...@mail.ru>" ]; platforms = [ "i686-linux" 
> > "x86_64-linux" "armv5tel-lin  ux" "armv6l-linux" "armv7l-linux" 
> > "mips64el-linux" ]; position = "/nix/store/75d9rrzyal2  
> > 7mn3fdwc060yrbhnyjihi-nixos-14.12.374.61adf9e/nixos/nixpkgs/pkgs/servers/nosql/apache-je
> >   na/binary.nix:29"; updateWalker = true; version = "2.12.1"; }; name = 
> > "apache-jena-2.12.  1"; out = { outPath = 
> > "/nix/store/3pl4jn0l4wx434g8vgv1assymvg7card-apache-jena-2.12.1";   }; 
> > outPath = "/nix/store/3pl4jn0l4wx434g8vgv1assymvg7card-apache-jena-2.12.1"; 
> > outputs =   [ "out" ]; system = "x86_64-linux"; type = "derivation"; } ]
> > 
> > So the offending part seems to be `downloadURLRegex = 
> > "apache-jena-.*[.]tar[.]gz$";`.
> > Is the package broken for including a regex? 
> 
> Looks like a bug in the manifest generation, since the '$' should be escaped.
> 
> > And how do I remove/fix it without
> > parsing that?
> 
> Please try "nix-env --rollback" to go back to the most recent non-corrupt 
> version.
> 
> -- 
> 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
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Regex in manifest breaks nix-env

2015-03-17 Thread Jeffrey David Johnson
Hi all! My nix-env commands recently stopped working. For example if I try
to `nix-env -q`, it says:

error: syntax error, unexpected $undefined, expecting '"', at 
"/nix/store/ar83fv0d68frfyifz2wl1dm97m6jvxnn-env-manifest.nix":1:153

The contents of `/nix/store/ar83fv0d68frfyifz2wl1dm97m6jvxnn-env-manifest.nix` 
are:

[ { meta = { description = "RDF database"; downloadPage = 
"http://archive.apache.org/dis  t/jena/binaries/"; downloadURLRegex = 
"apache-jena-.*[.]tar[.]gz$"; homepage = "http://j  ena.apache.org"; license = 
{ fullName = "Apache License 2.0"; shortName = "asl20"; spdxI  d = 
"Apache-2.0"; url = "http://spdx.org/licenses/Apache-2.0";; }; maintainers = [ 
"Micha  el Raskin <7c6f4...@mail.ru>" ]; platforms = [ "i686-linux" 
"x86_64-linux" "armv5tel-lin  ux" "armv6l-linux" "armv7l-linux" 
"mips64el-linux" ]; position = "/nix/store/75d9rrzyal2  
7mn3fdwc060yrbhnyjihi-nixos-14.12.374.61adf9e/nixos/nixpkgs/pkgs/servers/nosql/apache-je
  na/binary.nix:29"; updateWalker = true; version = "2.12.1"; }; name = 
"apache-jena-2.12.  1"; out = { outPath = 
"/nix/store/3pl4jn0l4wx434g8vgv1assymvg7card-apache-jena-2.12.1";   }; outPath 
= "/nix/store/3pl4jn0l4wx434g8vgv1assymvg7card-apache-jena-2.12.1"; outputs =   
[ "out" ]; system = "x86_64-linux"; type = "derivation"; } ]

So the offending part seems to be `downloadURLRegex = 
"apache-jena-.*[.]tar[.]gz$";`.
Is the package broken for including a regex? And how do I remove/fix it without
parsing that?
Thanks
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Using R with Bioconductor

2015-03-08 Thread Jeffrey David Johnson
Do any of you guys/gals use R and Bioconductor?

The only page I can find related to setting it up is .
Bioconductor is a whole additional ecosystem on top of R/CRAN,
with its own installer. You normally use it like:

source("http://bioconductor.org/biocLite.R";)
biocLite("PackageName")

They explain why at .
How hard would it be to package that using Nix?
Thanks
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Help packaging BLAST?

2015-02-24 Thread Jeffrey David Johnson
Hi! The existing BLAST package 
(https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/biology/ncbi-tools/default.nix)
 isn't working for me. Probably because it's broken on x64. So I'm trying to 
package the standalone executables from 
http://www.ncbi.nlm.nih.gov/books/NBK52640/ instead. I've created a package 
(https://github.com/jefdaj/nixpkgs/blob/master/pkgs/applications/science/biology/ncbi-blast/default.nix)
 but can't run the resulting programs. They all say something like:

$ blastn
bash: /run/current-system/sw/bin/blastn: No such file or directory

Based on https://www.biostars.org/p/12298/ I think I have the right 
architecture:

$ uname -a
Linux acro 3.14.29 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux

$ file blastn
blastn: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked 
(uses shared libs), for GNU/Linux 2.6.9, stripped

The "dynamically linked" part worries me though. Do I need to add build inputs 
referencing a specific gcc or something? Also including the suggested readelf 
command for completeness:

$ readelf -a blastn | head -n20
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class: ELF64
  Data:  2's complement, little endian
  Ident Version: 1 (current)
  OS/ABI:UNIX - System V
  ABI Version:   0
  Type:  EXEC (Executable file)
  Machine:   AMD x86-64
  Version:   1 (current)
  Entry point address:   0xc95f20
  Start of program headers:  64 (bytes into file)
  Start of section headers:  32499288 (bytes into file)
  Flags: 
  Size of this header:   64 (bytes)
  Size of program header entries:56 (bytes)
  Number of program headers entries: 9
  Size of section header entries:64 (bytes)
  Number of section headers entries: 32
  Section header string table index: 31

If this is a dead end, I could also try porting the Debian package right? How 
hard is that?
Thanks
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] "Disallowed host" while building Python packages?

2015-02-16 Thread Jeffrey David Johnson
Nevermind, of course that would be how it works because input hashes and all. 
Thanks! I probably should have gone to bed and come back to it in the morning.

Semi-related: if I generate some packages with python2nix do they go in 
pkgs/top-level/python-packages.nix or 
pkgs/top-level/python-packages-generated.nix? They're formatted just like the 
non-generated ones so I'm thinking "generated" means some other process?
Jeff

On Mon, 16 Feb 2015 09:30:16 +0100
Rok Garbas  wrote:

> Quoting Jeffrey David Johnson (2015-02-16 04:56:35)
> > I've had this happen a couple times now when trying to build Python 
> > packages. An error like:
> > 
> > Searching for paste
> > Note: Bypassing https://pypi.python.org/simple/paste/ (disallowed host; see 
> > http://bit.ly/1dg9ijs for details).
> > Couldn't find index page for 'paste' (maybe misspelled?)
> > Scanning index of all packages (this may take a while)
> > Note: Bypassing https://pypi.python.org/simple/ (disallowed host; see 
> > http://bit.ly/1dg9ijs for details).
> > No local packages or download links found for paste
> > error: Could not find suitable distribution for Requirement.parse('paste')
> > 
> > According to <http://bit.ly/1dg9ijs> you're supposed to make a setup.cfg 
> > file with contents like:
> > 
> > [easy_install]
> > allow_hosts = *.python.org
> > 
> > Is there a Nix equivalent?
> 
> hi jeff,
> 
> in nix setuptools is not allowed to download during installation. you need to
> package Paste and add it to buildInputs/propagatedBuildInputs list.
> 
> while this sounds like a pain, you only need to do this once and benefits (at
> least for me) outweights the packaging pain.
> 
> 
> 
> --
> Rok Garbas - http://www.garbas.si
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] "Disallowed host" while building Python packages?

2015-02-15 Thread Jeffrey David Johnson
I've had this happen a couple times now when trying to build Python packages. 
An error like:

Searching for paste
Note: Bypassing https://pypi.python.org/simple/paste/ (disallowed host; see 
http://bit.ly/1dg9ijs for details).
Couldn't find index page for 'paste' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Note: Bypassing https://pypi.python.org/simple/ (disallowed host; see 
http://bit.ly/1dg9ijs for details).
No local packages or download links found for paste
error: Could not find suitable distribution for Requirement.parse('paste')

According to  you're supposed to make a setup.cfg file 
with contents like:

[easy_install]
allow_hosts = *.python.org

Is there a Nix equivalent?
Thanks
Jeff
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Unstable Nixpkgs on stable NixOS (was: Automatically locking the screen with xautolock)

2015-02-10 Thread Jeffrey David Johnson
Wow my approach has been totally different. I think it's better at being 
declarative, but it doesn't allow getting user vs system packages from 
different sources so I have to pick between all stable or all unstable, or 
bother with the details of merging them.

I've got everything defined in a git repo full of .nix files with a submodule 
for my nixpkgs fork. When I want to add a package (or even just change one of 
my dotfiles) I edit the repo and do a nixos-rebuild. I think nix-env still 
references the official release-14.12 channel. Ideally I want it using my repo 
too, but since I barely use it there hasn't been a problem yet.

Short of changing my setup in a big way, maybe I should try merging the 
unstable branch into mine periodically? If that gets messed up I can copy and 
paste specific packages instead.

Also would setting some combination of NIXPKGS, NIXCFG, and NIX_PATH to point 
to my repos let me avoid channels altogether?

Thanks for writing this up! The environment variables, channels_root etc. are 
still sort of black magic to me and it helps.
Jeff

On Mon, 9 Feb 2015 19:17:46 -0800
Michael Alyn Miller  wrote:

> The 02/08/2015 12:21, Jeffrey David Johnson wrote:
> > Nice! I'm currently binding "gksu 'i3lock -c00 &
> > pm-suspend'" to a hotkey using i3, but this is better.  Is
> > there a standard way to get it in my fork of nixpkgs, which is
> > tracking the release-14.12 branch?  (I could just copy and
> > paste but if there's a better way now would be a good time to
> > learn.)
> 
> I certainly don't have an authoritative answer to this question,
> but I'll tell you what I am doing and then maybe someone with
> much more NixOS/Nixpkgs experience will chime in with
> tweaks/guidance.
> 
> In general I have the following goals for my NixOS system:
> 
> 1. I want everything to be reproducible, which of course means that my
>system is configured in /etc/nixos/configuration.nix, but also that
>any packages that I install as an individual user are reproducible as
>well.
> 2. Related to the above, I only want to put "system" packages into
>configuration.nix.  My theory here is that most of my package
>management is going to be done as a regular user, by creating
>project-specific nix-shell environments, etc.  Also, `nix-env -q` is
>a nice way to see everything that is installed and it doesn't appear
>that similar tools exist at the NixOS level.
> 
> Goal #1 means that configuration.nix is pretty basic -- the bare minimum
> number of packages to get my system working and launch an X environment
> (the window manager, for example, but no apps).
> 
> Goal #2 was more complex.  I found the following two references on this
> topic:
> 
> - 
> <https://nixos.org/wiki/FAQ#How_can_I_manage_software_with_nix-env_like_with_configuration.nix.3F>
> - <https://nixos.org/wiki/Howto_keep_multiple_packages_up_to_date_at_once>
> 
> I went with the first option because I wanted to be able to use `nix-env
> -q` to see what I had installed, regardless of how I did the install
> (manually or through the "myPackageSelections.nix" file).  I can provide
> more details here if you like.
> 
> With that choice out of the way, the next problem that I ran into was
> getting access to newer packages.  I have contributed a couple of
> packages to Nixpkgs, fixed some others, etc. and so far I had just been
> manually installing them out of my nixpkgs checkout.  This was not
> entirely compatible with my first goal, because now I had installed
> packages that were not listed in my configuration.
> 
> Enter the nixpkgs-unstable channel!  That channel seems to be updated
> pretty frequently and means that changes are available in binary form
> within a few days.  Thankfully my second goal meant that I already had a
> perfect split between stable and unstable: my NixOS configuration could
> stay on 14.12 and my user-level Nixpkgs was free to go unstable.
> 
> Getting this working was relatively straightforward, although I had to
> modify my environment in a couple of unexpected ways (more on this
> later).
> 
> The simple part is the `nix-channel --add 
> https://nixos.org/channels/nixpkgs-unstable`
> and `nix-channel --update` as a normal user.  Some things worked after
> that, but not everything.  `nix-env -i whatever` will happily use the
> nixpkgs-unstable channel because it finds that channel in ~/.nix-defexpr.
> Adding in the -f flag to specify your own expression means that nix-env
> no longer knows about the channel though.  Instead, nix-env falls back
> to NIX_PATH, which by default points at the stable NixOS channel and
> therefore has no idea that you want 

Re: [Nix-dev] Automatically locking the screen with xautolock

2015-02-08 Thread Jeffrey David Johnson
Nice! I'm currently binding "gksu 'i3lock -c00 & pm-suspend'" to a hotkey 
using i3, but this is better.
Is there a standard way to get it in my fork of nixpkgs, which is tracking the 
release-14.12 branch?
(I could just copy and paste but if there's a better way now would be a good 
time to learn.)
Jeff

On Sun, 8 Feb 2015 11:08:52 -0800
Michael Alyn Miller  wrote:

> The 02/08/2015 21:07, Nikita Karetnikov wrote:
> > How do I automatically lock the screen in NixOS?  I've installed
> > xautolock and slock.  And tested
> > 
> >   sudo xautolock -time 1 -locker slock
> > 
> > in the shell, which works fine.  Can I make it work without
> > sudo?
> 
> I use xss-lock, which I recently added to Nixpkgs.  I start
> xss-lock from .i3/config, but presumably it would work in
> displayManager.sessionCommands as well.  xss-lock uses xset to
> to both configure the screensaver delay as well as to manually
> start the screensaver (if you want to activate the screensaver
> with a hotkey, for example).
> 
> One of my favorite features of xss-lock is that it knows about
> suspend/resume and will automatically lock the screen on resume.
> 
> Here is the relevant section from my .i3/config file:
> 
> # Win+L locks the screen.
> bindsym Mod4+l exec xset s activate
> 
> # Start xss-lock (and lock the screen after 15 minutes)
> exec_always xset s 900
> exec_always --no-startup-id xss-lock -- i3lock -n -i $HOME/example.png
> 
> Let me know if you need any additional information.
> 
> Thanks,
> Michael Alyn Miller
> ___
> 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] Current path to installing on Raspberry Pi?

2015-02-04 Thread Jeffrey David Johnson
Don't think I'm brave enough quite yet. Getting closer though! Planning to do 
my first (unrelated) pull request tonight :D Thanks for the help. It sounds 
like a lot of progress is being made on the ARM build stuff so I'll just follow 
it for now and pitch out if there's something to do that doesn't suck so much 
time away from school. I would donate one of my two Raspberry Pis to the 
effort, except that won't help much because they aren't fast enough to compile 
on right?
Jeff

On Sat, 24 Jan 2015 22:45:49 +
Wout Mertens  wrote:

> :-/ Looks like your build is very broken... maybe ld-linux.so, the runtime
> linker, doesn't work?
> There was never a hydra job for Nix on arm it seems.
> If you're feeling brave you could try cross-compiling yourself:
> https://nixos.org/wiki/CrossCompiling
> 
> Wout.
> 
> On Sat Jan 24 2015 at 4:44:47 AM Jeff Johnson  wrote:
> 
> > OK I'm a little lost. The shell is doing something weird, but I'm not sure
> > what. When I `_NIXOS_REBUILD_REEXEC=1 nixos-rebuild switch`, it says:
> >
> > /run/current-system/sw/bin/nixos-rebuild: like 141:
> > /root/.nix-profile/bin/nix-instantiate: cannot execute binary file
> > building the system configuration...
> > /root/.nix-profile/bin/nix-build: line 3: user: command not found
> > ... that repeats for each line up to 18 ...
> >
> > If I try to run nix-instantiate directly it has the same "cannot execute
> > binary file" error, which means it's mistakenly being interpreted by bash
> > too right? I tried `perl $(which nixos-rebuild) switch`, but same error.
> >
> > The other thing I tried is looking for older builds. Somebody reported
> > being able to upgrade to 13.10 in September, so if I take a build of nix
> > from then maybe it'll still work. But I can't find the armv6l ones listed
> > anywhere on the hydra site. Is it possible to find them without knowing the
> > hash URL already?
> > Jeff
> >
> > On Fri, Jan 23, 2015 at 11:18 AM, Jeff Johnson  wrote:
> >
> >> Oh that makes sense. Might not be too hard to fix either. I'll try
> >> when I get home tonight. Thanks!
> >>
> >> On 1/23/15, Wout Mertens  wrote:
> >> > those errors seem to come from a shell trying to interpret perl
> >> source...
> >> >
> >> > On Mon Jan 12 2015 at 9:04:34 PM Jeff Johnson  wrote:
> >> >
> >> >> Hi all! I just tried to install NixOS on my Raspberry Pi following the
> >> >> wiki page (https://nixos.org/wiki/Raspberry_Pi). I think I got pretty
> >> >> close, but not quite all the way. I wrote the image to an sd card,
> >> booted
> >> >> it up, logged in as root, changed the nix-channel from unstable to
> >> 13.10,
> >> >> and tried to upgrade with:
> >> >>
> >> >> nixos-rebuild switch --upgrade
> >> >>
> >> >> It gave an error about needing at least nix 1.7 to parse the current
> >> nix
> >> >> expressions. I found the latest build and installed it following the
> >> >> directions on the wiki (
> >> >>
> >> https://nixos.org/wiki/How_to_update_when_nix_is_too_old_to_evaluate_nixpkgs
> >> >> ):
> >> >>
> >> >> nix-install-package --non-interactive --url
> >> >>
> >> http://hydra.nixos.org/build/18524521/nix/pkg/nix-1.8-armv6l-linux.nixpkg
> >> >>
> >> >> That appeared to work, but now when I rerun the upgrade command I get
> >> an
> >> >> error from the perl interpreter:
> >> >>
> >> >> [root@nixos:~]# nixos-rebuild switch --upgrade
> >> >> /root/.nix-profile/bin/nix-channel: line 3: use: command not found
> >> >> /root/.nix-profile/bin/nix-channel: line 4: use: command not found
> >> >> /root/.nix-profile/bin/nix-channel: line 5: use: command not found
> >> >> /root/.nix-profile/bin/nix-channel: line 6: syntax error near
> >> unexpected
> >> >> token '('
> >> >> /root/.nix-profile/bin/nix-channel: line 6: `use File::Path
> >> qw(mkpath);'
> >> >>
> >> >> I tried moving /root/.nix-profile but the version in /nix/var/... that
> >> it
> >> >> falls back on gives the same error. Do I need to manually find and
> >> >> install
> >> >> some dependencies?
> >> >> Thanks
> >> >> Jeff
> >> >> ___
> >> >> 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