From 77f9b50c78bf2df954d6914b467fc0dfab587292 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sun, 15 Dec 2019 15:16:17 +0100 Subject: [PATCH] nix: smaller closure Thanks to https://gist.github.com/tomberek/53a1f50def192cc924672eddda3719c7#file-docker-helper-nix-L146-L151 --- images/nix/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/images/nix/default.nix b/images/nix/default.nix index 1bf8485..ed544d3 100644 --- a/images/nix/default.nix +++ b/images/nix/default.nix @@ -1,9 +1,9 @@ { dockerTools -, bash +, bashInteractive , cacert , coreutils , curl -, gitMinimal +, git , gnutar , gzip , iana-etc @@ -11,6 +11,17 @@ , xz }: let + # gitMinimal still ships with perl and python + gitReallyMinimal = (git.override { + perlSupport = false; + pythonSupport = false; + withManual = false; + withpcre2 = false; + }).overrideAttrs(_:{ + # installCheck is broken when perl is disabled + doInstallCheck=false; + }); + image = dockerTools.buildImageWithNixDb { inherit (nix) name; @@ -18,12 +29,12 @@ let ./root coreutils # add /bin/sh - bash + bashInteractive nix # runtime dependencies of nix cacert - gitMinimal + gitReallyMinimal gnutar gzip xz