[Nix-dev] Providing more explicit nix installation instructions
Over the past couple months, I've installed nix about ten times on various systems, where the underlying system was either ubuntu, archlinux, centos, mac os x, or directly nixos. I've also set it up for administration through a user account, via sudo, and for multiple users. Sometimes things have worked out, sometimes they haven't. Usually, the documentation lacks a bit of explicit (sometimes vital) detail. Since I'll probably go through this processes occasionally in the future, I'd be willing to add my findings to the wiki or the documentation, if this would be of interest? Perhaps to start with: I wanted to install it on a Ubuntu 12.10 system from a user account, and noticed something weird: # Try to install the .deb $ sudo dpkg -i ~/Downloads/nix_1.3-1_amd64.deb # There were missing dependencies, so install them as follows: $ sudo apt-get update $ sudo apt-get install -f # Now this is the problem: $ sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable That created the file $HOME/.nix-channels in my USER home, but with owner root. Obviously not the correct behavior. The following `sudo nix-channel --update` failed (sorry, don't have the error message anymore). Any suggestions for a better way to do this? To get around the problem, I did something like the following: $ sudo rm ~/.nix-channels $ source /etc/profile.d/nix.sh The last command created ~/.nix-channels with the proper ownership and contents. I suppose it knew which channel to put in .nix-channels because of the first invocation of `nix-channel -add`? Should I have sourced nix.sh before calling `sudo nix-channel` the first time? Anyhow, after that, the following command *was* successful, and I could subsequently install software. $ sudo nix-channel --update Best regards, Ellis ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nix-env -qc firefox
On Fri, Jan 11, 2013 at 10:00:39PM -0800, James Cook wrote: On 11 January 2013 02:39, Petar Bogdanovic pe...@smokva.net wrote: something doesn't seem right here: $ nix-env -qc firefox firefox-17.0.1-with-plugins 18.0-with-plugins $ nix-env -u firefox $ nix-env -qc firefox firefox-17.0.1-with-plugins 18.0-with-plugins It looks like firefox 17.0.1 has a higher priority right now in nixpkgs. You can install firefox 18 explicitly by nix-env -i firefox-18.0-with-plugins (Incidentally, firefox 17.0.1 has known security vulnerabilities. Wouldn't that be an argument for making 18 the default, even if the expression isn't as well-tested?) I didn't know about the security vulnerabilities, but when I added firefox 18.0, I didn't know what to do about lowPrio, because sometimes we have had newer versions with lowPrio. I always end up using the latest, *if it works*. I guess you propose something similar. Regards, Lluís. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
Hi, I'm trying to install NixOS in a chroot. I'm using a tarball (nixos-system-mips64el-linux.tar.xz) that I fetched several month ago. So, the problem is the following error message. # nix-env -i hello error: syntax error, unexpected $undefined, expecting '}', at `/nix/store/pax21mr1bmd7m7zlghb77hrsj3ay9jii-nixos-0.1pre4033_e844fed-96a834d/nixos/nixpkgs/pkgs/build-support/replace-dependency.nix:20:11' (use `--show-trace' to show detailed location information) Here is a line that raises the error: { drv, old-dependency, new-dependency }: When I was using this tarball in the past, it worked fine. Is there a new tarball? Nikita pgppvmyBl2PTf.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [***SPAM***] HYDRA_DISALLOW_UNFREE=1 allows to install the Linux kernel from kernel.org
Hi, I've been told some time ago that it's possible to use NixOS without non-free packages if I run 'export HYDRA_DISALLOW_UNFREE=1'. Unfortunately, it allows to use a non-free version of the Linux kernel. Yes, I can change the corresponding recipe. But can this be done automatically? Also, are there any other non-free packages that can sneak in? Nikita P.S. The best solution would be to remove all non-free packages from the repos, but I understand that you won't agree. pgp0yNaunaup2.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
Hello, The problem is not with the tarball per se, it's with nixpkgs. To fix the issue, you can either update your nix version to at least nix 1.2, or wait until https://github.com/NixOS/nixpkgs/commit/5626c5cdfb6de664881eb8b79dd54a8f4ca19b8f hits the nixpkgs channel so it will still work with older versions of nix. Cheers, Shea On 01/12/2013 09:13 AM, Nikita Karetnikov wrote: Hi, I'm trying to install NixOS in a chroot. I'm using a tarball (nixos-system-mips64el-linux.tar.xz) that I fetched several month ago. So, the problem is the following error message. # nix-env -i hello error: syntax error, unexpected $undefined, expecting '}', at `/nix/store/pax21mr1bmd7m7zlghb77hrsj3ay9jii-nixos-0.1pre4033_e844fed-96a834d/nixos/nixpkgs/pkgs/build-support/replace-dependency.nix:20:11' (use `--show-trace' to show detailed location information) Here is a line that raises the error: { drv, old-dependency, new-dependency }: When I was using this tarball in the past, it worked fine. Is there a new tarball? Nikita ___ 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***] HYDRA_DISALLOW_UNFREE=1 allows to install the Linux kernel from kernel.org
Hello, HYDRA_DISALLOW_UNFREE was designed for our buildfarm, where unfree means not legally distributable. Since the kernel is legal to distribute despite the binary firmware blobs (I assume that's your objection?), HYDRA_DISALLOW_UNFREE will block it. In general, there's no automatic way to detect what is free and what is not, especially considering people's different definitions. HYDRA_DISALLOW_UNFREE depends on packagers specifying the license when they add an unfree package. If someone were to take the time to add meta attributes to each package that is free by their standards (or to every one that is not), it would be pretty easy to then provide a way for them to ensure their system only has those packages, but that initial work is not trivial. Cheers, Shea Levy On 01/12/2013 09:14 AM, Nikita Karetnikov wrote: Hi, I've been told some time ago that it's possible to use NixOS without non-free packages if I run 'export HYDRA_DISALLOW_UNFREE=1'. Unfortunately, it allows to use a non-free version of the Linux kernel. Yes, I can change the corresponding recipe. But can this be done automatically? Also, are there any other non-free packages that can sneak in? Nikita P.S. The best solution would be to remove all non-free packages from the repos, but I understand that you won't agree. ___ 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] systemd branch broken?
Hi Eelco, the issue was caused by the new version of udev: my 'eth0' device is now called 'enp4s0'. Because of this change, my network configuration wouldn't come up correctly. After fixing the name in configuration.nix, everything works fine again. Take care, Peter ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
The problem is not with the tarball per se, it's with nixpkgs. To fix the issue, you can either update your nix version to at least nix 1.2, or wait until https://github.com/NixOS/nixpkgs/commit/ 5626c5cdfb6de664881eb8b79dd54a8f4ca19b8f hits the nixpkgs channel so it will still work with older versions of nix. How should I update Nix? Will it work if I install it from sources? Is it necessary to use any special options with './configure'? Anyway, I'd like to know where I can download the tarball. I haven't found it here [1]. Nikita [1] http://hydra.nixos.org/project/nixos pgpAdGcFmnQOu.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
On 01/12/2013 10:59 AM, Nikita Karetnikov wrote: The problem is not with the tarball per se, it's with nixpkgs. To fix the issue, you can either update your nix version to at least nix 1.2, or wait until https://github.com/NixOS/nixpkgs/commit/ 5626c5cdfb6de664881eb8b79dd54a8f4ca19b8f hits the nixpkgs channel so it will still work with older versions of nix. How should I update Nix? Will it work if I install it from sources? Is it necessary to use any special options with './configure'? I believe that if you do 'nix-env -iA nix' (note the 'A'), you'll be able to install the newer nix without hitting the issue in replace-dependency. Anyway, I'd like to know where I can download the tarball. I haven't found it here [1]. I'm not sure. I know system-tarball-pc is on hydra, but I've not been able to find a mips64el tarball. I've cc'd Lluís (viric), who does most of the non-x86 work on nixos/nixpkgs. Nikita [1] http://hydra.nixos.org/project/nixos ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] [***SPAM***] Re: HYDRA_DISALLOW_UNFREE=1 allows to install the Linux kernel from kernel.org
HYDRA_DISALLOW_UNFREE was designed for our buildfarm, where unfree means not legally distributable. Since the kernel is legal to distribute despite the binary firmware blobs (I assume that's your objection?), HYDRA_DISALLOW_UNFREE will block it. Linux, the kernel developed and distributed by Linus Torvalds et al, contains non-Free Software, i.e., software that does not respect your essential freedoms, and it induces you to install additional non-Free Software that it doesn't contain. [1] In general, there's no automatic way to detect what is free and what is not, especially considering people's different definitions. HYDRA_DISALLOW_UNFREE depends on packagers specifying the license when they add an unfree package. If someone were to take the time to add meta attributes to each package that is free by their standards (or to every one that is not), it would be pretty easy to then provide a way for them to ensure their system only has those packages, but that initial work is not trivial. You're right. I forgot to define the word free. Here is a definition [2] that I had in mind. Yes, it's not trivial, but still possible. There is a list of free distros [3]. Nikita [1] http://www.fsfla.org/ikiwiki/selibre/linux-libre/ [2] https://gnu.org/philosophy/free-sw.html [3] https://gnu.org/distros/free-distros.html pgpdWbE6yPdMI.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
On Sat, Jan 12, 2013 at 11:11:37AM -0500, Shea Levy wrote: On 01/12/2013 10:59 AM, Nikita Karetnikov wrote: The problem is not with the tarball per se, it's with nixpkgs. To fix the issue, you can either update your nix version to at least nix 1.2, or wait until https://github.com/NixOS/nixpkgs/commit/ 5626c5cdfb6de664881eb8b79dd54a8f4ca19b8f hits the nixpkgs channel so it will still work with older versions of nix. How should I update Nix? Will it work if I install it from sources? Is it necessary to use any special options with './configure'? I believe that if you do 'nix-env -iA nix' (note the 'A'), you'll be able to install the newer nix without hitting the issue in replace-dependency. Anyway, I'd like to know where I can download the tarball. I haven't found it here [1]. I'm not sure. I know system-tarball-pc is on hydra, but I've not been able to find a mips64el tarball. I've cc'd Lluís (viric), who does most of the non-x86 work on nixos/nixpkgs. You assist Nikita very well. Nothing special in mips64, other than setting the proper platform in .nixpkgs/config.nix. And no need of Cc. :) Regards, Lluís. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] HYDRA_DISALLOW_UNFREE=1 allows to install the Linux kernel from kernel.org
On 01/12/2013 11:25 AM, Nikita Karetnikov wrote: HYDRA_DISALLOW_UNFREE was designed for our buildfarm, where unfree means not legally distributable. Since the kernel is legal to distribute despite the binary firmware blobs (I assume that's your objection?), HYDRA_DISALLOW_UNFREE will block it. Linux, the kernel developed and distributed by Linus Torvalds et al, contains non-Free Software, i.e., software that does not respect your essential freedoms, and it induces you to install additional non-Free Software that it doesn't contain. [1] In general, there's no automatic way to detect what is free and what is not, especially considering people's different definitions. HYDRA_DISALLOW_UNFREE depends on packagers specifying the license when they add an unfree package. If someone were to take the time to add meta attributes to each package that is free by their standards (or to every one that is not), it would be pretty easy to then provide a way for them to ensure their system only has those packages, but that initial work is not trivial. You're right. I forgot to define the word free. Here is a definition [2] that I had in mind. Yes, it's not trivial, but still possible. Sure, and if someone who cares about it does the work to mark the packages (or create a new set of packages that all meet those criteria), then nix could be set up to not install packages you don't want. Until then though, it's the individual user who will have to monitor the packages they install. There is a list of free distros [3]. Nikita [1] http://www.fsfla.org/ikiwiki/selibre/linux-libre/ [2] https://gnu.org/philosophy/free-sw.html [3] https://gnu.org/distros/free-distros.html ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
On 01/12/2013 11:29 AM, Lluís Batlle i Rossell wrote: On Sat, Jan 12, 2013 at 11:11:37AM -0500, Shea Levy wrote: On 01/12/2013 10:59 AM, Nikita Karetnikov wrote: The problem is not with the tarball per se, it's with nixpkgs. To fix the issue, you can either update your nix version to at least nix 1.2, or wait until https://github.com/NixOS/nixpkgs/commit/ 5626c5cdfb6de664881eb8b79dd54a8f4ca19b8f hits the nixpkgs channel so it will still work with older versions of nix. How should I update Nix? Will it work if I install it from sources? Is it necessary to use any special options with './configure'? I believe that if you do 'nix-env -iA nix' (note the 'A'), you'll be able to install the newer nix without hitting the issue in replace-dependency. Anyway, I'd like to know where I can download the tarball. I haven't found it here [1]. I'm not sure. I know system-tarball-pc is on hydra, but I've not been able to find a mips64el tarball. I've cc'd Lluís (viric), who does most of the non-x86 work on nixos/nixpkgs. You assist Nikita very well. Nothing special in mips64, other than setting the proper platform in .nixpkgs/config.nix. But where does the nixos-system-mips64el-linux.tar.xz tarball come from? And no need of Cc. :) Some people put ml posts directly into a less-often checked folder unless they're mentioned directly :) Regards, Lluís. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
On Sat, Jan 12, 2013 at 11:32:45AM -0500, Shea Levy wrote: But where does the nixos-system-mips64el-linux.tar.xz tarball come from? I built it and Nikita picked it thanks to OOB conversations :) The same way I distributed arm system tarballs on request. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
I built it and Nikita picked it thanks to OOB conversations :) The same way I distributed arm system tarballs on request. Ah, right. I forgot about that. Thanks. Nikita pgpWWuh4NDU9P.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
I believe that if you do 'nix-env -iA nix' (note the 'A'), you'll be able to install the newer nix without hitting the issue in replace-dependency. # nix-env -iA nix error: attribute `nix' in selection path `nix' not found I've found a workaround here [1], but it didn't help. Do you have any other ideas? I have some Nix-related binaries in '/usr/local/bin' in a different chroot. Can I somehow reuse those? Nikita [1] http://nixos.org/irc/logs/log.20120311 pgpmTMKIe_ndU.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
On 01/12/2013 01:33 PM, Nikita Karetnikov wrote: I believe that if you do 'nix-env -iA nix' (note the 'A'), you'll be able to install the newer nix without hitting the issue in replace-dependency. # nix-env -iA nix error: attribute `nix' in selection path `nix' not found Ah, right, you'll need something like nix-env -iA nixos.nixpkgs.nix. If that path doesn't work (that's for the nixos channel, you may need something different), look for a directory named nixpkgs in ~/.nix-defexpr (or its subdirectories), and do nix-env -iA nix -f ~/.nix-defexpr/path/to/nixpkgs I've found a workaround here [1], but it didn't help. Do you have any other ideas? I have some Nix-related binaries in '/usr/local/bin' in a different chroot. Can I somehow reuse those? Nikita [1] http://nixos.org/irc/logs/log.20120311 ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
Ah, right, you'll need something like nix-env -iA nixos.nixpkgs.nix. If that path doesn't work (that's for the nixos channel, you may need something different), look for a directory named nixpkgs in ~/.nix-defexpr (or its subdirectories), and do nix-env -iA nix -f ~/.nix-defexpr/path/to/nixpkgs Thanks, the latter did the job. Nikita pgp4zb3rFoyAI.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] understanding Nix: dependencies
On 01/11/2013 08:46 PM, Shea Levy wrote: OK, I've now implemented one such solution: https://github.com/NixOS/nixpkgs/commit/d1662d715514e6ef9d3dc29f132f1b3d8e608a18 . So now in the event a rebuild would be too costly, you can still patch a broken/insecure dependency without breaking nix invariants. It's nice to have such a tool (although I don't expect to need it personally). Vlada 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] mips64el: syntax error in 'replace-dependency.nix'
Thanks, the latter did the job. Oh, it failed. [...] glibc-ports-2.13/sysdeps/z8000/mul_1.s glibc-ports-2.13/sysdeps/z8000/sub_n.s configure flags: --disable-static --prefix=/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13 -C --enable-add-ons --sysconfdir=/etc --localedir=/var/run/current-system/sw/lib/locale --with-headers=/nix/store/lk00b5xr85ahkjzvs3lw9wi1dzwc4q9a-linux-headers-2.6.35.14/include --disable-profile /nix/store/vv7mwqlqllys5sz231j47b71yaypdz3l-stdenv-linux-boot/setup: /tmp/nix-build-2wwhdpp5zkrj6a38va3xixm2yan1hrq6-glibc-2.13.drv-0/build/../glibc-2.13/configure: /bin/sh: bad interpreter: No such file or directory builder for `/nix/store/2wwhdpp5zkrj6a38va3xixm2yan1hrq6-glibc-2.13.drv' failed with exit code 126 cannot build derivation `/nix/store/c70lpv849qj3kngpcfzhkphg07xsj7bf-perl-5.14.2.drv': 1 dependencies couldn't be built cannot build derivation `/nix/store/pwq1czxhg9rlpchraqy5mki0v9xlszis-nix-1.3.drv': 1 dependencies couldn't be built error: build of `/nix/store/pwq1czxhg9rlpchraqy5mki0v9xlszis-nix-1.3.drv' failed Nikita pgpA0ZMFC_Yvj.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] mips64el: syntax error in 'replace-dependency.nix'
On 01/12/2013 04:57 PM, Nikita Karetnikov wrote: Thanks, the latter did the job. Oh, it failed. [...] glibc-ports-2.13/sysdeps/z8000/mul_1.s glibc-ports-2.13/sysdeps/z8000/sub_n.s configure flags: --disable-static --prefix=/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13 -C --enable-add-ons --sysconfdir=/etc --localedir=/var/run/current-system/sw/lib/locale --with-headers=/nix/store/lk00b5xr85ahkjzvs3lw9wi1dzwc4q9a-linux-headers-2.6.35.14/include --disable-profile /nix/store/vv7mwqlqllys5sz231j47b71yaypdz3l-stdenv-linux-boot/setup: /tmp/nix-build-2wwhdpp5zkrj6a38va3xixm2yan1hrq6-glibc-2.13.drv-0/build/../glibc-2.13/configure: /bin/sh: bad interpreter: No such file or directory Are you doing chroot builds? It looks like your /bin/sh is linked to an interpreter outside of the chroot. Since nix-1.3, it's possible to have a /bin/sh in the chroot that isn't the same /bin/sh as outside the chroot, but since you're trying to install nix-1.3 you'll either have to change your system /bin/sh or disable chroot builds. builder for `/nix/store/2wwhdpp5zkrj6a38va3xixm2yan1hrq6-glibc-2.13.drv' failed with exit code 126 cannot build derivation `/nix/store/c70lpv849qj3kngpcfzhkphg07xsj7bf-perl-5.14.2.drv': 1 dependencies couldn't be built cannot build derivation `/nix/store/pwq1czxhg9rlpchraqy5mki0v9xlszis-nix-1.3.drv': 1 dependencies couldn't be built error: build of `/nix/store/pwq1czxhg9rlpchraqy5mki0v9xlszis-nix-1.3.drv' failed Nikita ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev