nixpkgs/pkgs
Maximilian Bosch 1cab56e01a buildEnv: break with a proper error if one path is actually a file
I noticed by creating `buildEnv` where I accidentally put a derivation
from `pkgs.writeText` into `paths` and got a broken build with the
following misleading error message:

```
Use of uninitialized value $stat1 in numeric ne (!=) at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 74.
Use of uninitialized value $stat1 in bitwise and (&) at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 75.
different permissions in `' and `/nix/store/0vy5ss91laxvwkyvrbld5hv27i88qk5w-noise': 0000 <-> 0444 at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 75.
```

It can be reproduced with an expression like this:

``` nix
{ pkgs ? import <nixpkgs> { } }:
let
  file = pkgs.writeText "test" ''
    content
  '';
in
  pkgs.buildEnv {
    name = "test-env";
    paths = [ /* ... */ file ];
  }
```
2019-02-19 07:56:44 +01:00
..
applications Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
build-support buildEnv: break with a proper error if one path is actually a file 2019-02-19 07:56:44 +01:00
common-updater common-update-scripts: fixup for current/latest nix hash output 2019-02-11 17:54:35 -06:00
data Merge master into staging-next 2019-02-16 09:29:54 +01:00
desktops Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
development Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
games Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
misc Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
os-specific Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
servers Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
shells fish: 3.0.0 -> 3.0.1 2019-02-18 13:12:56 +08:00
stdenv Merge remote-tracking branch 'origin/master' into staging 2019-02-09 12:14:06 -05:00
test
tools Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00
top-level Merge remote-tracking branch 'NixOS/master' into staging 2019-02-18 20:36:48 -05:00