Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: b1bbd94bb680
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 1cab56e01a28
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 19, 2019

  1. 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 ];
      }
    ```
    Ma27 authored and FRidh committed Feb 19, 2019
    Copy the full SHA
    1cab56e View commit details
    Browse the repository at this point in the history