nix: smaller closure
Thanks to https://gist.github.com/tomberek/53a1f50def192cc924672eddda3719c7#file-docker-helper-nix-L146-L151
This commit is contained in:
parent
1fa23404ff
commit
77f9b50c78
1 changed files with 15 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
||||||
{ dockerTools
|
{ dockerTools
|
||||||
, bash
|
, bashInteractive
|
||||||
, cacert
|
, cacert
|
||||||
, coreutils
|
, coreutils
|
||||||
, curl
|
, curl
|
||||||
, gitMinimal
|
, git
|
||||||
, gnutar
|
, gnutar
|
||||||
, gzip
|
, gzip
|
||||||
, iana-etc
|
, iana-etc
|
||||||
|
@ -11,6 +11,17 @@
|
||||||
, xz
|
, xz
|
||||||
}:
|
}:
|
||||||
let
|
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 {
|
image = dockerTools.buildImageWithNixDb {
|
||||||
inherit (nix) name;
|
inherit (nix) name;
|
||||||
|
|
||||||
|
@ -18,12 +29,12 @@ let
|
||||||
./root
|
./root
|
||||||
coreutils
|
coreutils
|
||||||
# add /bin/sh
|
# add /bin/sh
|
||||||
bash
|
bashInteractive
|
||||||
nix
|
nix
|
||||||
|
|
||||||
# runtime dependencies of nix
|
# runtime dependencies of nix
|
||||||
cacert
|
cacert
|
||||||
gitMinimal
|
gitReallyMinimal
|
||||||
gnutar
|
gnutar
|
||||||
gzip
|
gzip
|
||||||
xz
|
xz
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue