Re: [Nix-dev] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread zimbatm
What does the deb exactly contain and take care of ?
I'm not sure of the boundary between the system package manager and nix.
For example once nix is installed I would expect the `nix` binary to be
managed by it, but if it's provided by the system package as well then it's
possible to have two versions installed. This in turn might leads to
confused users who just upgraded `nix` but are still having the old version.

On the other end, it would be nice if installing nix was just a matter of
running `curl -L https://nixos.org/nix-current/$(uname)-$(arch).tar.bz2 |
tar xa -C /nix && ln -s /nix/bin/nix-env /usr/local/bin` and then setup the
profile. But then making this cross-platform is going to be a challenge.


On Tue, 22 Sep 2015 at 18:42 Hajo Möller  wrote:

> Hi,
>
> On 09/22/2015 11:35 AM, Thomas Hunger wrote:
> > I can think of two solutions 1) make the packages set up nix correctly
> > so nix-env is usable out of the box and 2) Remove all custom packages
> > and tell people to use the installer script.
>
> I'm strongly against 2), as I don't think curl-ing into sh is a good
> idea at all. There was a HN discussion about (not) doing it two years
> ago: https://news.ycombinator.com/item?id=6650987
>
> A more recent example comes from chef's blog:
>
> https://www.chef.io/blog/2015/07/16/5-ways-to-deal-with-the-install-sh-curl-pipe-bash-problem/
>
> Please at least print the script before executing it, pipe it through
> moreutil's vipe? vipe may not be available and requires perl, so that's
> not good, either...
>
> While I haven't looked at the .deb packages so far, there may be a way
> to have launchpad build the .debs and provide a PPA.
> I saw Eelco Dolstra maintains the .debs, thanks for that! When I needed
> nix to look at how the manual gets built, I just grabbed a .deb.
>
> --
> Regards,
> Hajo Möller
> ___
> 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] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread Hajo Möller
Hi,

On 09/22/2015 11:35 AM, Thomas Hunger wrote:
> I can think of two solutions 1) make the packages set up nix correctly
> so nix-env is usable out of the box and 2) Remove all custom packages
> and tell people to use the installer script.

I'm strongly against 2), as I don't think curl-ing into sh is a good
idea at all. There was a HN discussion about (not) doing it two years
ago: https://news.ycombinator.com/item?id=6650987

A more recent example comes from chef's blog:
https://www.chef.io/blog/2015/07/16/5-ways-to-deal-with-the-install-sh-curl-pipe-bash-problem/

Please at least print the script before executing it, pipe it through
moreutil's vipe? vipe may not be available and requires perl, so that's
not good, either...

While I haven't looked at the .deb packages so far, there may be a way
to have launchpad build the .debs and provide a PPA.
I saw Eelco Dolstra maintains the .debs, thanks for that! When I needed
nix to look at how the manual gets built, I just grabbed a .deb.

-- 
Regards,
Hajo Möller
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixpkgs haskell system got into inconsistent state broken

2015-09-22 Thread Utku Demir
Also, there is a slightly faster way to recover from that bug mentioned in
Nixpkgs Manual[1], which is to just rebuild the problematic package and its
dependencies.

[1]
http://nixos.org/nixpkgs/manual/#how-to-recover-from-ghcs-infamous-non-deterministic-library-id-bug

On Mon, 21 Sep 2015 at 14:19 Thomas Hunger  wrote:

> It's possible you hit the infamous non-deterministic package hash
> generation [1] for which Peter collected data recently [2]. AFAICT the only
> solution is to remove and rebuild or refetch all haskell packages.
>
> This bug has high priority for GHC 8 so I hope it'll eventually go away.
>
>
>
> [1]
> https://ghc.haskell.org/trac/ghc/ticket/4012
>
> [2]
> http://lists.science.uu.nl/pipermail/nix-dev/2015-June/017405.html
>
> On 21 September 2015 at 10:41, Miguel Negrão <
> miguel.negrao-li...@friendlyvirus.org> wrote:
>
>> Hi
>>
>> This week I encountered a situation where when I tried to build one of my
>> own packages which was working fine before, it would fail claiming that
>> every single Haskell package it needed was missing:
>>
>> http://pastebin.com/agqw9dn2
>> http://pastebin.com/Vyqc5U3e
>>
>> I had not changed anything or installed anything in nix for quite a while,
>> the only thing I can think that could have caused this was that my
>> filesystem had died (btrfs) and I had to restore from backup the whole of
>> /.
>> I have not used binary cache to build any of the haskell packages, they
>> were
>> built from source.
>>
>> Is it possible that the restore of / via rsync could have caused this ?
>>
>> In the meantime I had did a rm -r /nix and installed everything again and
>> my
>> system is working again, exactly as before this issue (I had everything
>> specified in my config.nix), which is a testament to how easy it is to
>> rebuild a system with nix if you have a declarative description of your
>> packages.
>>
>> Thanks,
>> Miguel
>>
>> ___
>> 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] [***SPAM***] Thoughts on the Nix model

2015-09-22 Thread Vladimír Čunát
Hi.

On 09/14/2015 01:40 PM, Kosyrev Serge wrote:
> The simple fact that Turing-complete code is used to describe /everything/.
> [...]
> In my perception, this situation can't be good in the long term.

I think we should be able to side-step related problems in most cases,
though only trying to do so will show the truth.

In typical cases our style is relatively easy to analyze visually (and
we do want that), so tools should also be able to do so without great
difficulties. Of course, Turing-completeness probably allows us to break
any simple tools, but there shouldn't be need in most cases to utilize
the strength and diverge from the simple style.


Vladimir




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread Thomas Hunger
The deb can be inspected with "dpkg -c". It contains all the nix-*
commands, man pages, some perl, headers and some basic nix library
functions. What's missing is a postinst script that setting up the things
according to [1] (probably needs updating).

On reflection platform specific packages would be useful to work around
issues like [2] which one of my friends hit today. And as Vladimir says for
the multi-user setup with the daemon. I'm not sure I have the energy to go
around and fix all the packages but maybe debian and arch would be a good
start.

~

[1]
https://nixos.org/wiki/Installing_Nix_on_Debian

[2]
https://github.com/NixOS/nix/issues/599


On 22 September 2015 at 22:31, Vladimír Čunát  wrote:

> On 09/22/2015 10:03 PM, zimbatm wrote:
> > On the other end, it would be nice if installing nix was just a
> > matter of running `curl -L
> > https://nixos.org/nix-current/$(uname)-$(arch).tar.bz2 | tar xa -C
> > /nix && ln -s /nix/bin/nix-env /usr/local/bin` and then setup the
> > profile.
>
> I think the nix daemon complicates things a bit, as you need to plug it
> into the host OS services.
>
> Vladimir
>
>
> ___
> 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] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread Alastair Pharo
Just thought I'd point out that on Arch Linux we have the [nix-multiuser
package][1] that pretty much takes care of the multiuser setup.

[1]: https://aur4.archlinux.org/packages/nix-multiuser/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread Thomas Hunger
Hi,

Slight ramble ahead.

I've managed to get several people to try Nix after constantly raving about
it and all but one had a bad experience. The reason AFAICT is that they
first check for nix in their default package tool (apt-get, pacman, ...).
These packages install nix-*  binaries but they don't help with the single
or multi-user /nix setup. So the first thing they see is "error: creating
directory ‘/nix’: Permission denied".

I can think of two solutions 1) make the packages set up nix correctly so
nix-env is usable out of the box and 2) Remove all custom packages and tell
people to use the installer script.

I know 2 is quite radical but to me it seems preferable to leaving people
who aren't necessarily great unix admins googling for an error with no
solution on the first results page.

~


[1]
https://nixos.org/wiki/Installing_Nix_on_Debian
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread Eelco Dolstra
Hi,

On 22/09/15 11:35, Thomas Hunger wrote:

> I can think of two solutions 1) make the packages set up nix correctly so
> nix-env is usable out of the box and 2) Remove all custom packages and tell
> people to use the installer script.

+1 on option 2.

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


Re: [Nix-dev] Providing Debian, Arch etc. packages counterproductive?

2015-09-22 Thread Jookia
On Tue, Sep 22, 2015 at 11:37:58AM +0200, Eelco Dolstra wrote:
> Hi,
> 
> On 22/09/15 11:35, Thomas Hunger wrote:
> 
> > I can think of two solutions 1) make the packages set up nix correctly so
> > nix-env is usable out of the box and 2) Remove all custom packages and tell
> > people to use the installer script.
> 
> +1 on option 2.

Why not both? Have the packages run the installer script.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev