Re: [Nix-dev] Writing a Nix evaluator in Haskell
As such, I've started a project call hnix which will implement a parser and evaluator for Nix in Haskell. I have the parser working for simple expressions already (using either Parsec or Trifecta, it works with both). AFAIK Peter Simons has written a parser previously, too. Maybe search in the mailinglist archives to join efforts See here: Subject: Haskell Parser for (subset of) Nix http://article.gmane.org/gmane.linux.distributions.nixos/10538/match=nix+parser+haskell My first goal is a syntax verification vim-addon-nix has been using it for ages: nix-instantiate --parse-only foo.nix does a syntax-check You may want to use it till your alternative is ready. Comparing with an Haskell implementation would be fun for many reasons, using multiple cores for instance. Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Writing a Nix evaluator in Haskell
Wow John you weren't kidding just a few hours ago. Good luck with the project, was hoping to see a Quickcheck tests directory. Aloha, RK. On Sun, Jun 29, 2014 at 10:03 AM, John Wiegley jo...@newartisans.com wrote: Since the Nix language is such a nice and simple pure functional language, I thought it would be nice to have tooling support for it in Haskell, to aid writing lint utilities, etc. As such, I've started a project call hnix which will implement a parser and evaluator for Nix in Haskell. I have the parser working for simple expressions already (using either Parsec or Trifecta, it works with both). My first goal is a syntax verification and linting tool; after that to see I want to see if I can get an evaluator working for Nix programs. I have a strong feeling that a Nix evaluator can be modeled very simply as a loeb function over memoized IO actions, which is a theory I want to explore in this code. http://github.com/jwiegley/hnix John ___ 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] Hi, I'm new!
Hi, I don't know if this is wanted on this list (isn't there a users-list somewhere?), but I want to introduce myself before sending my bunch of questions! I'm a 22 year old CS student from south germany. I heard from nixos the first time at UnFUCK[0], a conference at my university, I organized myself. ATM I'm an Archlinux user (been for ~7 years), but within the next year I want to build a Tower-PC and I'm heavily thinking about nixos for it. For me, nixos is the first _real_ approach to solve the dependency-hell problem. Is it appropriate to send my questions to this ML? I guess I will send them in seperate mails if you ACK this, as some of them may lead to longer discussuions (who knows). So, ... Hi nixos ML! Ask me anything. [0]: unfuck.eu -- Mit freundlichen Grüßen, Kind regards, Matthias Beyer Proudly sent with mutt. Happily signed with gnupg. pgpxb_oQSloYd.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] Hi, I'm new!
Hi Matthias, Feel free to ask questions on the mailing list, and on the #nixos channel on freenode (http://webchat.freenode.net/?channels=#nixos) but it's worth mentioning too that the manual and academic papers have a wealth of information, so, you will probably find most questions you have are already answered there in great depth. Welcome aboard! Cillian On Sun, Jun 29, 2014 at 11:01 AM, Matthias Beyer m...@beyermatthias.de wrote: Hi, I don't know if this is wanted on this list (isn't there a users-list somewhere?), but I want to introduce myself before sending my bunch of questions! I'm a 22 year old CS student from south germany. I heard from nixos the first time at UnFUCK[0], a conference at my university, I organized myself. ATM I'm an Archlinux user (been for ~7 years), but within the next year I want to build a Tower-PC and I'm heavily thinking about nixos for it. For me, nixos is the first _real_ approach to solve the dependency-hell problem. Is it appropriate to send my questions to this ML? I guess I will send them in seperate mails if you ACK this, as some of them may lead to longer discussuions (who knows). So, ... Hi nixos ML! Ask me anything. [0]: unfuck.eu -- 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 -- NixOS: The Purely Functional Linux Distribution http://nixos.org ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Binary packages for custom store path installs
Hi Mateusz, On Fri, Jun 13, 2014 at 7:22 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk wrote: In environments where one only has regular user rights resources are often constrained, be it hard drive space, memory or computational power. Incurring the penalty of having to compile everything on top of that merely because the store is not sitting at the top of the file system is rather sub-optimal so it would be great if there was a solution. BTW, have you tried user namespaces? I.e. in recent kernel you can create another root filesystem, even having only regular user permissions. Here is proof of concept script: #!/bin/sh -e dirs=bin etc proc root tmp usr dev nix run sys var home mkdir newroot || true for i in $dirs $cant_mount; do mkdir newroot/$i || true mount --rbind /$i newroot/$i done exec chroot newroot /bin/sh Run it with: lxc-usernsexec -- unshare -m ./newroot.sh And you'll be in separate root and you don't need any privileges for that. You probably only need a = 3.8 kernel. If you don't have lxc-usernsexec script or newuidmap (which is a dependency of lxc-usernsexec), it is replaced by simple bash script. unshare utility is from util-linux so should be everywhere. I'm running in nix, so I just bind-mount /nix folder. You are probably going to use the one directly in newroot. -- Paul ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Hi, I'm new!
Hi there Matthias, On Sun, 29 Jun 2014 11:01:26 +0200 Matthias Beyer m...@beyermatthias.de wrote: I don't know if this is wanted on this list (isn't there a users-list somewhere?), but I want to introduce myself before sending my bunch of questions! I'm a 22 year old CS student from south germany. I heard from nixos the first time at UnFUCK[0], a conference at my university, I organized myself. ATM I'm an Archlinux user (been for ~7 years), but within the next year I want to build a Tower-PC and I'm heavily thinking about nixos for it. This is currently our main mailing list. Sadly introducing yourself to a web community is a custom that seems to have gone into oblivion, so I'm glad that you're remining us that it still exists. Also south Germany (where I live, too) may benefit from more NixOS users. =) Is it appropriate to send my questions to this ML? I guess I will send them in seperate mails if you ACK this, as some of them may lead to longer discussuions (who knows). Go ahead. As Cillian noted there is also the #nixos channel, if you prefer a less rigid form of communication. Greets Ertugrul -- Ertugrul Söylemez ert...@gmx.de ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Writing a Nix evaluator in Haskell
On 29/06/14 01:03, John Wiegley wrote: Since the Nix language is such a nice and simple pure functional language, I thought it would be nice to have tooling support for it in Haskell, to aid writing lint utilities, etc. As such, I've started a project call hnix which will implement a parser and evaluator for Nix in Haskell. I have the parser working for simple expressions already (using either Parsec or Trifecta, it works with both). Weird, I started exactly this project yesterday! I was using uu-parsinglib, but yours is much further ahead than mine, so I'll ditch it and try and switch over to yours. My first goal is a syntax verification and linting tool; after that to see I want to see if I can get an evaluator working for Nix programs. My goal is not really parsing though, but building Nix files by working with an AST rather than gluing a bunch of Strings together. Keep up the good work! - ocharles signature.asc Description: OpenPGP digital signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Writing a Nix evaluator in Haskell
Hah, I also started to write a parser for nix expressions as an exercise! But now that there is already a parser, I'll probably just use yours. -- Benno 2014-06-29 16:37 GMT+02:00 Oliver Charles ol...@ocharles.org.uk: On 29/06/14 01:03, John Wiegley wrote: Since the Nix language is such a nice and simple pure functional language, I thought it would be nice to have tooling support for it in Haskell, to aid writing lint utilities, etc. As such, I've started a project call hnix which will implement a parser and evaluator for Nix in Haskell. I have the parser working for simple expressions already (using either Parsec or Trifecta, it works with both). Weird, I started exactly this project yesterday! I was using uu-parsinglib, but yours is much further ahead than mine, so I'll ditch it and try and switch over to yours. My first goal is a syntax verification and linting tool; after that to see I want to see if I can get an evaluator working for Nix programs. My goal is not really parsing though, but building Nix files by working with an AST rather than gluing a bunch of Strings together. Keep up the good work! - ocharles ___ 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] @nixpkg
Hi, I make a @nixpkg on twitter without asking. Sorry. It's important to promote the Nix package system as well as @nixos_org. I'm happy to change the password and hand off to the appropriate person[s]. Cheers, Steve. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] @nixpkg
On 06/29/2014 11:41 PM, Steven Shaw wrote: Hi, I make a @nixpkg on twitter without asking. Sorry. It's important to promote the Nix package system as well as @nixos_org. I'm happy to change the password and hand off to the appropriate person[s]. Cheers, Steve. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev I have dispatched the Twitter© police. Why not @nixpkgs (note the ‘s’)? -- Mateusz K. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] multiple-ouputs branch
Referred [1] is work on one particular package, but we want to (attempt to) do this for almost all packages by shared code, probably by stdenv modification. I'd like to say that [1] uses small library as an example of approach to multiple outputs, but it aims to be as generic as possible. I believe it should not be build system dependent as it is in original multiple-output branches,but instead an analog of debhelper dh_install should be used, where paths which go to particular output are specified (with some sane defaults if possible) and then copied from common build install dir. It works for simple cases very well (separate dev,bin, and doc), but due to the way Nix generate dependencies and multiple hacks used to make conventional programs work with Nix (like shebang mangling, or python trickery), non trivial post processing is needed for files when they are copied to separate output. multiple-output branch mentioned here relies on autotools to split output into multiple dirs, it will cover many cases of course, but anything using something else will be left uncovered and it is enough to have one package to include header files to pull whole compiler and *-dev stack into the system, basically negating all the positive effect of merging multiple-output branch. Back to [1], it is possible to enable it transparently to all packages after it is mature enough, just need to change mkDerivation to unconditionally include scatterOutputHook and set outputs, but there is a problem I see no solution for: list of outputs is passed from top to bottom, not other way around, so there is no way to inspect result of $out and decide which packages this package is going to be splitted into, therefore any attempt to magically provide reduced install size without any cooperation from pkgs maintainers on package-to-package basis is doomed to fail. Which is not bad at all, deb and rpm guys do that for years after all, but it would be awesome to have it :) ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Extra manpage per service?
Totally agree, +1 from me. Having per service documentation makes total sense. On Mon, Jun 9, 2014 at 11:02 AM, Bjørn Forsman bjorn.fors...@gmail.com wrote: Hi all, I've been messing around with the nixos 'graphite' service lately. I thought the module was a bit thin on the documentation side, so I started to search online. I came across this graphite puppet module[1], and what struck me is that there is no way that our current man configuration.nix can provide that kind of detail for each service, without being completely unreadable. So, how about we add a manpage for each service.name? I think it would be a good idea to still have everything in man configuration.nix, although man nixos-service-TAB-TAB would probably be just as easy to navigate. Does that sound like a good idea to you? Is it easy to do? I don't know where to begin :-) [1]: https://forge.puppetlabs.com/dwerder/graphite Best regards, Bjørn Forsman ___ 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] @nixpkg
:). I didn't want to promote the nixpkgs but Nix the package (management) system. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev