[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] mxe on NixOS

2015-09-01 Thread Andrew Kelley
Wrapping this thread up:

mxe has an environment variable whitelist that was causing the problem.
NixOS relies heavily on environment variables (such as PKG_CONFIG_PATH) to
utilize /nix/store/*. mxe has the whitelist in order to keep the OS
separate from MXE, but it also relies on hard coded paths ("standard
directories"). So mxe simultaneously wants to separate its environment from
the OS environment while interfacing with the OS environment via hard coded
paths. The maintainer recognized it as an MXE limitation, a limitation
which was too hard to overcome for such a non-mainstream OS.

Upstream discussion:
https://github.com/mxe/mxe/issues/723#issuecomment-133584114

Thanks for the assistance in figuring this out, I appreciate it.

On Thu, Aug 20, 2015 at 7:33 PM James Cook  wrote:

> >> * If you can successfully build ordinary glib that way, but can't
> >> build mxe glib, it might be time to take it back to the mxe people.
> >
> > OK so it sounds like maybe this is an mxe issue after all?
>
> Could be. I would report back to the mxe bug, since you've verified
> that you have everything you need to build glib normally (including
> running autogen.sh).
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Nixpkgs [haskell] overlay

2015-09-01 Thread Manuel Pages
Hey, beautiful people!

For our own packages (WIP ones and private), we'd like to inject our own
stuff into
haskellPackages by means of an overlay, maintained as a [git] repository.
We want solution to be as transparent as possible while not being a fork of
nixpkgs.
We imagine some module that reexports pkgs and //s it with a set of injected
packages, but there's quite a machinery in haskell-modules/default.nix
which I'd like
not to copy-paste into our overlay.

Do you do something along this lines? How'd you attack such a problem?
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] vagrant-nixos-plugin

2015-09-01 Thread Alexander Flatter
Hello Christian,

this is great - I’m looking forward to play with this.

> On 01 Sep 2015, at 22:14, Christian Theune  wrote:
> 
> Hi,
> 
> even though the "vagrant-nixos” plugin was featured on the Twitter feed 
> recently - the original author seems to be MIA and Zimbatm and I want to move 
> forward. We’ve been trying to get in contact for a couple of months now and 
> we thought it’s time to fork and move on.
> 
> We have created “vagrant-nixos-plugin” [1] (yeah, we’re screwed, the name of 
> the ruby gem is gone until the original Chris reappears) and forked it on 
> Github. We’re currently working on cleaning it up, getting a few bugs that 
> have been annoying Zimbatm and me, and then also provide pre-baked 15.09 
> Vagrant images.
> 
> This will take a couple of days, but if anyone wants to jump onboard, you’re 
> obviously welcome.
> 
> At some point we think it could be worthwhile to move those repositories (for 
> the Vagrant imaging and the plugin) under the NixOS team umbrella.
> 
> Cheers,
> Christian
> 
> [1] https://github.com/zimbatm/vagrant-nixos-plugin 
> 
> 
> —
> Christian Theune · c...@flyingcircus.io  · +49 
> 345 219401 0
> Flying Circus Internet Operations GmbH · http://flyingcircus.io 
> 
> Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
> HR Stendal HRB 21169 · Geschäftsführer: Christian. Theune, Christian. 
> Zagrodnick
> 
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] vagrant-nixos-plugin

2015-09-01 Thread Christian Theune
Hi,

even though the "vagrant-nixos” plugin was featured on the Twitter feed 
recently - the original author seems to be MIA and Zimbatm and I want to move 
forward. We’ve been trying to get in contact for a couple of months now and we 
thought it’s time to fork and move on.

We have created “vagrant-nixos-plugin” [1] (yeah, we’re screwed, the name of 
the ruby gem is gone until the original Chris reappears) and forked it on 
Github. We’re currently working on cleaning it up, getting a few bugs that have 
been annoying Zimbatm and me, and then also provide pre-baked 15.09 Vagrant 
images.

This will take a couple of days, but if anyone wants to jump onboard, you’re 
obviously welcome.

At some point we think it could be worthwhile to move those repositories (for 
the Vagrant imaging and the plugin) under the NixOS team umbrella.

Cheers,
Christian

[1] https://github.com/zimbatm/vagrant-nixos-plugin 


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



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] PSA: basic NixOS installer

2015-09-01 Thread Nikita Karetnikov
I wrote a simple script for myself for installing on a UEFI machine.
Maybe someone will find it useful:

https://github.com/nkaretnikov/nixos-installer

The main idea is to allow you to boot with a minimal config, so you could
iterate on it, instead of dancing around with a flash drive in case you
mistype something.

Make sure to read the README.  And let me know if there are any issues.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Custom packages and build-support functions

2015-09-01 Thread Eric Sagnes
Hi,

While trying to add the image magick php extension to a container as a custom 
package[1]
with the following separate nix expression:


with import  {}; 
buildPecl {
  version = "3.1.2";
  name = "imagick-${version}";
  sha256 = "14vclf2pqcgf3w8nzqbdw0b9v30q898344c84jdbw2sa62n6k1sj";
  configureFlags = "--with-imagick=${pkgs.imagemagick}";
}


I got the following error
error: undefined variable ‘buildPecl’ at /etc/nixos/imagick-pecl.nix:2:1

How can build-support functions be imported and used in custom packages?

Cheers,

[1] 
https://nixos.org/nixos/manual/sec-package-management.html#sec-custom-packages
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Trouble packaging llvmlite, Python bindings for LLVM

2015-09-01 Thread Freddy Rietdijk
Hi Thomas,

It's good to hear you also gave it a try. I reported the issue
https://github.com/numba/llvmlite/issues/93

Freddy

On Sun, Aug 30, 2015 at 12:30 PM, Thomas Hunger  wrote:

> Hi Freddy,
>
> I ran into the numba segfault as well [1]. I tried to debug the issue with
> a numba core dev when in the same room but we didn't make any progress in
> an hour. Potentially a double-free bug. Probably worth filing an issue
> which I forgot to do.
>
> ~
>
> [1]
> In [1]: import numba
> *** Error in
> `/nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python2.7':
> free(): invalid pointer: 0x7f501151f3c0 ***
> === Backtrace: =
>
> /nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libc.so.6(+0x70d2f)[0x7f502aa60d2f]
>
> /nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libc.so.6(+0x760be)[0x7f502aa660be]
> 
>
> On 30 August 2015 at 09:56, Freddy Rietdijk 
> wrote:
>
>> Dear Nixers,
>>
>> In the last couple of weeks I've been packaging a bunch of Python
>> packages, mostly packages that I use for my research. There is one package
>> though (or in fact, two), that I can't seem to build correctly: llvmlite
>> and numba. The first is a Python binding to LLVM, and the other is a JIT
>> that uses the binding.
>>
>> llvmlite can be build, but unfortunately segfaults. I don't know too much
>> about compiling, let alone compilers. I was able to build a working version
>> on Debian though.
>>
>> If you could have a look at it, I would very much appreciate it:
>> https://github.com/NixOS/nixpkgs/pull/9516
>> and a direct link to the build log:
>> https://s3.amazonaws.com/archive.travis-ci.org/jobs/77894848/log.txt
>> I would be very hapy to get these working, since then I could finally
>> switch to NixOS on my main machine.
>>
>> Kind regards,
>>
>> Frederik
>>
>> ___
>> 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