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: cd960b965f25
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 42a0b1145094
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 6, 2018

  1. dockerTools.pullImage: Fix build with sandboxing

    Regression introduced in 7368487.
    
    This commit most certainly hasn't been tested with sandboxing enabled
    and breaks not only pullImage but also the docker-tools NixOS VM test
    because it doesn't find it's certificate path and also relies on
    /var/tmp being there.
    
    Fixing the certificate path is the easiest one because it can be done
    via environment variable.
    
    I've used overrideAttrs for changing the hardcoded path to /tmp (which
    is available in sandboxed builds and even hardcoded in Nix), so that
    whenever someone uses Skopeo from all-packages.nix the path is still
    /var/tmp.
    
    The reason why this is hardcoded to /var/tmp can be seen in a comment in
    vendor/github.com/containers/image/storage/storage_image.go:
    
      Do not use the system default of os.TempDir(), usually /tmp, because
      with systemd it could be a tmpfs.
    
    With sandboxed builds this isn't the case, however for using Nix without
    NixOS this could turn into a problem if this indeed is the case.
    
    So in the long term this needs to have a proper solution.
    
    In addition to that, I cleaned up the expression a bit.
    
    Tested by building dockerTools.examples.nixFromDockerHub and the
    docker-tools NixOS VM test.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @nlewo, @Mic92, @Profpatsch, @globin, @LnL7
    aszlig committed May 6, 2018
    3 Configuration menu
    Copy the full SHA
    42a0b11 View commit details
    Browse the repository at this point in the history