diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-04-05 10:18:45 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-04-05 17:04:59 +1000 |
commit | e65aba25f8d8f20e83cd765e9a90b7b038f5f694 (patch) | |
tree | 61f0640e8708d64876ac75189bc34ac63ebfe7b0 /pkgs/build-support/docker | |
parent | 76636e00998bd095c083b107ec76a51b3c17aab1 (diff) | |
download | nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.tar nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.tar.gz nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.tar.bz2 nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.tar.lz nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.tar.xz nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.tar.zst nixpkgs-e65aba25f8d8f20e83cd765e9a90b7b038f5f694.zip |
dockerTools: misc fixes
- add nixosTests to `dockerTools.tests` - don't use `pkgs` or `lib.singleton`
Diffstat (limited to 'pkgs/build-support/docker')
-rw-r--r-- | pkgs/build-support/docker/default.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 96ea363c811..5a4e30ede8a 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -16,8 +16,8 @@ , makeWrapper , moreutils , nix +, nixosTests , pigz -, pkgs , rsync , runCommand , runtimeShell @@ -26,6 +26,7 @@ , storeDir ? builtins.storeDir , substituteAll , symlinkJoin +, tarsum , util-linux , vmTools , writeReferencesToFile @@ -81,6 +82,15 @@ rec { inherit buildImage buildLayeredImage fakeNss pullImage shadowSetup buildImageWithNixDb; }; + tests = { + inherit (nixosTests) + docker-tools + docker-tools-overlay + # requires remote builder + # docker-tools-cross + ; + }; + pullImage = let fixName = name: builtins.replaceStrings [ "/" ":" ] [ "-" "-" ] name; @@ -113,7 +123,7 @@ rec { outputHashAlgo = "sha256"; outputHash = sha256; - nativeBuildInputs = lib.singleton skopeo; + nativeBuildInputs = [ skopeo ]; SSL_CERT_FILE = "${cacert.out}/etc/ssl/certs/ca-bundle.crt"; sourceURL = "docker://${imageName}@${imageDigest}"; @@ -132,7 +142,7 @@ rec { # We need to sum layer.tar, not a directory, hence tarsum instead of nix-hash. # And we cannot untar it, because then we cannot preserve permissions etc. - tarsum = pkgs.tarsum; + inherit tarsum; # pkgs.dockerTools.tarsum # buildEnv creates symlinks to dirs, which is hard to edit inside the overlay VM mergeDrvs = @@ -754,7 +764,7 @@ rec { # "#!/usr/bin/env executable" shebang. usrBinEnv = runCommand "usr-bin-env" { } '' mkdir -p $out/usr/bin - ln -s ${pkgs.coreutils}/bin/env $out/usr/bin + ln -s ${coreutils}/bin/env $out/usr/bin ''; # This provides /bin/sh, pointing to bashInteractive. |