summary refs log tree commit diff
path: root/pkgs/build-support/docker/examples.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2020-06-18 17:29:21 +0200
committerRobert Hensing <robert@roberthensing.nl>2020-06-19 10:08:34 +0200
commitcaf47063b4b5d82a61753ea437f97e5642eedd03 (patch)
tree5a1ccb2f975eb72863b060cde3f6f936fb0fbc59 /pkgs/build-support/docker/examples.nix
parentc04e95573ace9892d9898e5821e66cef29c164b5 (diff)
downloadnixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.tar
nixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.tar.gz
nixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.tar.bz2
nixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.tar.lz
nixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.tar.xz
nixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.tar.zst
nixpkgs-caf47063b4b5d82a61753ea437f97e5642eedd03.zip
dockerTools: test that tar keeps nix binary symlinks intact
Diffstat (limited to 'pkgs/build-support/docker/examples.nix')
-rw-r--r--pkgs/build-support/docker/examples.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix
index d533e3abd03..b040d830b31 100644
--- a/pkgs/build-support/docker/examples.nix
+++ b/pkgs/build-support/docker/examples.nix
@@ -121,6 +121,7 @@ rec {
       # the image env variable NIX_PAGER.
       pkgs.coreutils
       pkgs.nix
+      pkgs.bash
     ];
     config = {
       Env = [
@@ -313,4 +314,25 @@ rec {
       )
     ];
   };
+
+  nixLayered = pkgs.dockerTools.buildLayeredImageWithNixDb {
+    name = "nix-layered";
+    tag = "latest";
+    contents = [
+      # nix-store uses cat program to display results as specified by
+      # the image env variable NIX_PAGER.
+      pkgs.coreutils
+      pkgs.nix
+      pkgs.bash
+    ];
+    config = {
+      Env = [
+        "NIX_PAGER=cat"
+        # A user is required by nix
+        # https://github.com/NixOS/nix/blob/9348f9291e5d9e4ba3c4347ea1b235640f54fd79/src/libutil/util.cc#L478
+        "USER=nobody"
+      ];
+    };
+  };
+
 }