[Nix-dev] Deduplication

2014-04-14 Thread Raahul Kumar
I followed Eelco's suggestion of running nix-store --optimise. Output: `/nix/store/.links/09d75zzfhid0v9azq4qpprhfpfyjb27b89qnarqwz6bqgjxl7pq6' has maximum number of links 172.20 MiB freed by hard-linking 34905 files; there are 351670 files with equal contents out of 365448 files in total

Re: [Nix-dev] Deduplication

2014-04-14 Thread Mathijs Kwik
Raahul Kumar raahul.ku...@gmail.com writes: Thanks Kirill, I'll go email the BTRFS devs, see if they have a fix for this hardlink issue. Anyone else got a workaround for the dedup issue with Btrfs and nixos? I think you misunderstood the output. There are X files with equal contents out of

Re: [Nix-dev] Deduplication

2014-04-14 Thread Vladimír Čunát
On 04/14/2014 09:51 AM, Mathijs Kwik wrote: But it's still whole-file based. btrfs is internally able to support block-level deduplication, which is very cool for making copies of things like database copies and virtualization images. Of course these cases are already served by snapshot volumes,

[Nix-dev] Nix language: converting an attribute set to a list

2014-04-14 Thread Sergey Mironov
Hi. Nix language has a built-in function builtins.listToAttrs which converts list to the Attrs. I'm searching a way to make an opposite thing - convert attrs to a list. Say, I'd like to convert users = { root = { name = root; group = groups.root; }; ssh = { name = ssh ;

Re: [Nix-dev] Nix language: converting an attribute set to a list

2014-04-14 Thread Marc Weber
attrValues (mapAttrs (name: vals: merge or check that name is same as name key) ) attrs Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev

Re: [Nix-dev] unable to expose libraries internal to GHC?

2014-04-14 Thread Peter Simons
Hi Corey GHC 7.8.x installs a copy of xhtml, but it doesn't make that library visible to users. This choice causes us serious trouble that we cannot easily resolve: we can't install your own copy of xhtml, because it collides with GHC's copy (as you have found out). Yet, we cannot access GHC's

Re: [Nix-dev] is there something like unsafeImpureEnvVars?

2014-04-14 Thread Peter Simons
Hi Ben, Fetching source over the network is the main reason fixed output derivations even exist. When chroot builds are enabled, networking is not allowed for non-fixed output derivations. Interesting, I did not know this. I agree that this policy makes sense for stuff that gets

Re: [Nix-dev] Various kernel options

2014-04-14 Thread Peter Simons
Hi Raahul, a NixOS configuration cannot contain more than one kernel. However, you can have more than one bootable NixOS configuration installed on the same machine. Check out the profile stuff in the nixos-rebuild man page. There might be additional resources on this subject in the Wiki, but I'm

Re: [Nix-dev] [PATCH]

2014-04-14 Thread Shea Levy
Hi Ludo’, On Mon, Apr 14, 2014 at 03:38:01PM +0200, Ludovic Courtès wrote: The patch below allows files such as /nix/store/foo to be protected from GC if a root refers to them. This makes it easy for a build hook to use such files for its temporary working files. WDYT? It seems a bit

Re: [Nix-dev] [PATCH] Allow roots to refer to arbitrary files in the store

2014-04-14 Thread Ludovic Courtès
(Oops, forgot the Subject line; sorry!) Shea Levy s...@shealevy.com skribis: On Mon, Apr 14, 2014 at 03:38:01PM +0200, Ludovic Courtès wrote: The patch below allows files such as /nix/store/foo to be protected from GC if a root refers to them. This makes it easy for a build hook to use such

Re: [Nix-dev] [PATCH] Allow roots to refer to arbitrary files in the store

2014-04-14 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) skribis: Shea Levy s...@shealevy.com skribis: On Mon, Apr 14, 2014 at 03:38:01PM +0200, Ludovic Courtès wrote: The patch below allows files such as /nix/store/foo to be protected from GC if a root refers to them. This makes it easy for a build hook to use

[Nix-dev] Infinite recursion with npm2nix

2014-04-14 Thread Colin Putney
Hi folks, In my on-going quest to package up my node applications, I've run into a noob-trap that has me completely stumped. The app is a web app, so it has both client- and server-side code. One of the dependencies is Yahoo's Pure CSS library. PureCSS, in turn relies on Grunt for its build

Re: [Nix-dev] is there something like unsafeImpureEnvVars?

2014-04-14 Thread Ben Franksen
Peter Simons wrote: Fetching source over the network is the main reason fixed output derivations even exist. When chroot builds are enabled, networking is not allowed for non-fixed output derivations. Interesting, I did not know this. I agree that this policy makes sense for

Re: [Nix-dev] is there something like unsafeImpureEnvVars?

2014-04-14 Thread Ben Franksen
Hi Shea thanks for taking the time to explain this to me. I see now that what I wanted is not possible in a clean way. I think what confused me was that Nix does not enforce purity of builds by default. Out of the box, i.e. without chroot builds, getting sources for instance via darcs or