Re: [Nix-dev] Mate-on-Nixos: nix-shell runs OK, but nix-build hangs when compiling libmateweather

2014-05-29 Thread Anderson Torres
Well, I added --enable-all-translations-in-one-xml as a workaround,
bypassing some make directives...
I think it can be something related to Nix itself, but I will investigate later.

I am fighting against other bugs, too - now in 'caja', the file
manager. But I will post about them today at night.

2014-05-27 5:38 GMT-03:00 Anderson Torres torres.anderson...@gmail.com:

 But there is some real difference between nix-shell and nix-build? What if I 
 catch a bug on nix?
 Anyway I will try it tonight.


 2014-05-27 2:00 GMT-03:00 Wout Mertens wout.mert...@gmail.com:

 Build it with -K, break and go check out what it does to build 
 stamp-locations. Possibly it's using a tty or so and you would have to patch 
 the make file.

 Still, weird.

 On May 27, 2014 2:31 AM, Anderson Torres torres.anderson...@gmail.com 
 wrote:

 Hello, Nixers!

 I am with another problem when compiling another Mate component, 
 libmateweather.

 My problem is a bit strange. When I run:

 nix-build ~/GITHUB/nix-packages-github/nixpkgs/default.nix -A 
 mate.libmateweather

 it hangs on a message building stamp-Locations.xml, and no more output is 
 written out (read pastebin: http://pastebin.com/75wW2FGT)

 But when I run genericBuild inside nix-shell, it just runs fine (read 
 another pastebin again: http://pastebin.com/qQXCZS4A)

 Can someone explain why? AFAIK that type of error is not reported in other 
 sources like Archlinux or Gentoo...


 P.S.: I have posted all code I have made so far (mate-common, mate-desktop, 
 libmatekbd, libmateweather) into my nixpkgs mirror, below mate-on-nixos 
 branch (https://github.com/AndersonTorres/nixpkgs/tree/mate-on-nixos).



 ___
 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] Nix/Nixpkgs on Cygwin

2014-05-29 Thread Sander van der Burg - EWI
Hello Nixers,

Recently I had to do couple of development tasks on *cough cough* MS Windows.

Unfortunately, Nix did not seem to work on it anymore, so I have decided revive 
the Cygwin support. I had to make a few subtle modifications to the Nix package 
manager, such as including cstdlib at several places, because a few functions 
were undeclared according to the compiler.

Moreover, the -std=c++0x gcc parameter caused another file not to compile 
because fdopen() could not be found (because it's not ANSI/ISO C). I solved it 
changing the gcc parameter to -std=gnu++0x

Currently, these changes live in my personal Nix fork:

https://github.com/svanderburg/nix/commit/7f685b6550d7393874fc6ef26b9a03a8ace2f90e

Moreover, I had to fix a couple of things in Nixpkgs. These changes also live 
in my personal fork of Nixpkgs:

https://github.com/svanderburg/nixpkgs/commit/9ec52d632302ad6267a83b563de9927f886e1817

Besides a couple of essential cygwin fixes, I also added support for 
x86_64-cygwin, which also seems to exist these days.

To make the Nix package manager work on Cygwin, I had to install the following 
Perl packages through CPAN (besides having all the relevant development 
packages installed):

perl -MCPAN -e 'install DBD::SQLite'
perl -MCPAN -e 'install WWW::Curl'

I compiled and installed Nix by running the following command-line instructions:

./configure --disable-perl-bindings
make BUILD_SHARED_LIBS=0
make BUILD_SHARED_LIBS=0 install

I disabled building shared libs, as they can't really be properly used with Nix 
on Cygwin anyway, so there is no need to investigate how to enable them.

I don't know if anyone is in favour of  getting these changes merged upstream? 
Our current policy is that Cygwin is not officially supported. But if that 
doesn't matter, I can file a pull request so that anyone can benefit from these 
changes.

Moreover, any feedback is welcome!

Regards,

Sander van der Burg

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


Re: [Nix-dev] Nix/Nixpkgs on Cygwin

2014-05-29 Thread Domen Kožar
Did you run into https://github.com/NixOS/nix/issues/19?


On Thu, May 29, 2014 at 3:08 PM, Sander van der Burg - EWI 
s.vanderb...@tudelft.nl wrote:

  Hello Nixers,

 Recently I had to do couple of development tasks on *cough cough* MS
 Windows.

 Unfortunately, Nix did not seem to work on it anymore, so I have decided
 revive the Cygwin support. I had to make a few subtle modifications to the
 Nix package manager, such as including cstdlib at several places, because a
 few functions were undeclared according to the compiler.

 Moreover, the -std=c++0x gcc parameter caused another file not to compile
 because fdopen() could not be found (because it's not ANSI/ISO C). I solved
 it changing the gcc parameter to -std=gnu++0x

 Currently, these changes live in my personal Nix fork:


 https://github.com/svanderburg/nix/commit/7f685b6550d7393874fc6ef26b9a03a8ace2f90e

 Moreover, I had to fix a couple of things in Nixpkgs. These changes also
 live in my personal fork of Nixpkgs:


 https://github.com/svanderburg/nixpkgs/commit/9ec52d632302ad6267a83b563de9927f886e1817

 Besides a couple of essential cygwin fixes, I also added support for
 x86_64-cygwin, which also seems to exist these days.

 To make the Nix package manager work on Cygwin, I had to install the
 following Perl packages through CPAN (besides having all the relevant
 development packages installed):

 perl -MCPAN -e 'install DBD::SQLite'
 perl -MCPAN -e 'install WWW::Curl'

 I compiled and installed Nix by running the following command-line
 instructions:

 ./configure --disable-perl-bindings
 make BUILD_SHARED_LIBS=0
 make BUILD_SHARED_LIBS=0 install

 I disabled building shared libs, as they can't really be properly used
 with Nix on Cygwin anyway, so there is no need to investigate how to enable
 them.

 I don't know if anyone is in favour of  getting these changes merged
 upstream? Our current policy is that Cygwin is not officially supported.
 But if that doesn't matter, I can file a pull request so that anyone can
 benefit from these changes.

 Moreover, any feedback is welcome!

 Regards,

 Sander van der Burg


 ___
 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] Nix/Nixpkgs on Cygwin

2014-05-29 Thread Sander van der Burg - EWI
Yes I know this issue. It's a few years old actually.

Right now, I haven't checked the substituters things yet. First, because we 
don't have any prebuilt stuff on Hydra. Second, I think it should work with 
Perl bindings disabled, but I'm not entirely sure about that.

Regarding DLLs:

I know this is impure, but we can still link libraries statically if we want. 
Or simply ignore the side effects or rebases. :P

Moreover, besides Win32 binaries Nix can also be useful for other kinds of 
components.


From: Domen Kožar [do...@dev.si]
Sent: Thursday, May 29, 2014 3:15 PM
To: Sander van der Burg - EWI
Cc: nix-...@cs.uu.nl
Subject: Re: [Nix-dev] Nix/Nixpkgs on Cygwin

Did you run into https://github.com/NixOS/nix/issues/19?


On Thu, May 29, 2014 at 3:08 PM, Sander van der Burg - EWI 
s.vanderb...@tudelft.nlmailto:s.vanderb...@tudelft.nl wrote:
Hello Nixers,

Recently I had to do couple of development tasks on *cough cough* MS Windows.

Unfortunately, Nix did not seem to work on it anymore, so I have decided revive 
the Cygwin support. I had to make a few subtle modifications to the Nix package 
manager, such as including cstdlib at several places, because a few functions 
were undeclared according to the compiler.

Moreover, the -std=c++0x gcc parameter caused another file not to compile 
because fdopen() could not be found (because it's not ANSI/ISO C). I solved it 
changing the gcc parameter to -std=gnu++0x

Currently, these changes live in my personal Nix fork:

https://github.com/svanderburg/nix/commit/7f685b6550d7393874fc6ef26b9a03a8ace2f90e

Moreover, I had to fix a couple of things in Nixpkgs. These changes also live 
in my personal fork of Nixpkgs:

https://github.com/svanderburg/nixpkgs/commit/9ec52d632302ad6267a83b563de9927f886e1817

Besides a couple of essential cygwin fixes, I also added support for 
x86_64-cygwin, which also seems to exist these days.

To make the Nix package manager work on Cygwin, I had to install the following 
Perl packages through CPAN (besides having all the relevant development 
packages installed):

perl -MCPAN -e 'install DBD::SQLite'
perl -MCPAN -e 'install WWW::Curl'

I compiled and installed Nix by running the following command-line instructions:

./configure --disable-perl-bindings
make BUILD_SHARED_LIBS=0
make BUILD_SHARED_LIBS=0 install

I disabled building shared libs, as they can't really be properly used with Nix 
on Cygwin anyway, so there is no need to investigate how to enable them.

I don't know if anyone is in favour of  getting these changes merged upstream? 
Our current policy is that Cygwin is not officially supported. But if that 
doesn't matter, I can file a pull request so that anyone can benefit from these 
changes.

Moreover, any feedback is welcome!

Regards,

Sander van der Burg


___
nix-dev mailing list
nix-dev@lists.science.uu.nlmailto: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] Using Nixpkgs outside of NixOS

2014-05-29 Thread Wout Mertens
I think there is room for improvement for installing and using nixpkgs on
another distribution.

I see two big problems:
1. installation
2. environment variables

Installation:

The single-user installation is cute, but realistically you need root
anyway to create /nix so it would be nice if there was a script that set up
the proper environment, with the correct permissions under /nix/var/nix,
the system-wide shell profiles, nixbld users, a
users-that-are-allowed-to-use-nix-env group and the nix-daemon startup
script for the popular distros.

Right now you need to manually do these things, and some are not obvious
like having to change your ~/.nix-profile dir to a per-user one
(/etc/profile.d/nix.sh points it to /nix/var/nix/profiles/default which
doesn't exist, and nix-env -i doesn't seem to handle that case).

The end goal should be run this script and you'll have full access to
everything in Nixpkgs with per-user profiles and secure defaults. All
barriers to adoption should be removed as much as possible.

Environment Variables:
=
There are several packages that rely on environment variables to work
correctly, like glibc ($TZ_DIR) and curl ($CURL_CA_BUNDLE). Those aren't
defined when you're not on NixOS.
For the regular $NIX_PATH, $PATH etc, sourcing nix.sh from /etc/profile
isn't enough, because for example ssh doesn't start a bash login shell. For
those cases, it needs to be sourced from /etc/bash.bashrc as well.
Similar issues are probably happening with tcsh, zsh etc.

Thoughts?

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


Re: [Nix-dev] Using Nixpkgs outside of NixOS

2014-05-29 Thread Wout Mertens
Another issue I just remembered is that of setuid binaries. NixOS has a
mechanism for it, and it could just as easily be used elsewhere. Without
it, you can't easily use qemu for example.

Wout.

On Thu, May 29, 2014 at 5:28 PM, Wout Mertens wout.mert...@gmail.comwrote:

 I think there is room for improvement for installing and using nixpkgs on
 another distribution.

 I see two big problems:
 1. installation
 2. environment variables

 Installation:
 
 The single-user installation is cute, but realistically you need root
 anyway to create /nix so it would be nice if there was a script that set up
 the proper environment, with the correct permissions under /nix/var/nix,
 the system-wide shell profiles, nixbld users, a
 users-that-are-allowed-to-use-nix-env group and the nix-daemon startup
 script for the popular distros.

 Right now you need to manually do these things, and some are not obvious
 like having to change your ~/.nix-profile dir to a per-user one
 (/etc/profile.d/nix.sh points it to /nix/var/nix/profiles/default which
 doesn't exist, and nix-env -i doesn't seem to handle that case).

 The end goal should be run this script and you'll have full access to
 everything in Nixpkgs with per-user profiles and secure defaults. All
 barriers to adoption should be removed as much as possible.

 Environment Variables:
 =
 There are several packages that rely on environment variables to work
 correctly, like glibc ($TZ_DIR) and curl ($CURL_CA_BUNDLE). Those aren't
 defined when you're not on NixOS.
 For the regular $NIX_PATH, $PATH etc, sourcing nix.sh from /etc/profile
 isn't enough, because for example ssh doesn't start a bash login shell. For
 those cases, it needs to be sourced from /etc/bash.bashrc as well.
 Similar issues are probably happening with tcsh, zsh etc.

 Thoughts?

 Wout.

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


Re: [Nix-dev] Using Nixpkgs outside of NixOS

2014-05-29 Thread Wout Mertens
On May 29, 2014 6:58 PM, Eelco Dolstra eelco.dols...@logicblox.com
wrote:

 Hi,

 On 29/05/14 18:34, Wout Mertens wrote:

  Another issue I just remembered is that of setuid binaries. NixOS has a
  mechanism for it, and it could just as easily be used elsewhere.
Without it, you
  can't easily use qemu for example.

 Why? Qemu does not need to be setuid.

Oops I meant VirtualBox. fping is another example. Or anything really.
Setuid and nix don't mix without help.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Using Nixpkgs outside of NixOS

2014-05-29 Thread John Wiegley
 Wout Mertens wout.mert...@gmail.com writes:

 I think there is room for improvement for installing and using nixpkgs on
 another distribution.

 I see two big problems:
 1. installation
 2. environment variables

Also: setting up services to run when the system boots.  For example, Homebrew
tells you how to add a symlinks in ~/Library/LaunchAgents so that PostgreSQL
can start when the machine boots (it simply prints the command to the terminal
as an informational message).  We can do the same thing with Nix, it's just a
question of informing the user how.

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


Re: [Nix-dev] Using Nixpkgs outside of NixOS

2014-05-29 Thread Wout Mertens
On Thu, May 29, 2014 at 10:23 PM, John Wiegley jo...@newartisans.com
wrote:

  Wout Mertens wout.mert...@gmail.com writes:

  I think there is room for improvement for installing and using nixpkgs on
  another distribution.

  I see two big problems:
  1. installation
  2. environment variables

 Also: setting up services to run when the system boots.  For example,
 Homebrew
 tells you how to add a symlinks in ~/Library/LaunchAgents so that
 PostgreSQL
 can start when the machine boots (it simply prints the command to the
 terminal
 as an informational message).  We can do the same thing with Nix, it's
 just a
 question of informing the user how.

 Is there anybody that knows how to set up systemd as non-PID-1 but still
as root? That would be awesome++, I could turn my Ubuntu 12.04 servers into
lean mean partially Nix-based service running machines.

Obviously systemd would then have to not do things that udev etc are
already doing... Just running services, opening sockets, handling cgroups...

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


[Nix-dev] apache module and ip:port configurations?

2014-05-29 Thread Marc Weber
For fun I tried placing apache behind nginx.
making apache listen on non standard port made existing installations
such as wordpress return redirects. (Yes, could be fixed, ..)
I tried setting up a second loopback device so that I was able to use
port 80 twice (once for nginx proxy_passing requests to apache then
listening on an arbitrary local network address different from
127.0.0.1).

The problem I faced was that the apache module did not allow me
specifying it. The attached patch fixes this, but replaces
port = 80; by a more complicated listen = [{ ip = ...; port = 80;}]
interface.

One way would be making the listen option default to something based on
port if it was set by the user. which is the way to refer to the
config of that particular virtualHost because type = types.attrOf (..)
is used.

Is anybody else interested in such patch?

Marc Weber


apache-module-ip-port.patch
Description: Binary data
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] [Mate-on-Nixos] Work in progress

2014-05-29 Thread Anderson Torres
Hello, Nixers!

Well, I want to share my noviceness on NixOS. I am working on port Mate
Desktop (a fork of GNOME 2).

I have posted a not-so-small amount of messages here in the list, in part
because I'm not a so smart programmer, and in part because I want to share
my experiences in a huge project like compiling a full desktop environment
for a brand new Linux distro.

For now I will to concentrate all effort making questions and showing my
progress on that thread: [Mate-on-Nixos]. My intention is to document
everything I am doing.

Many thanks in advance!

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