hi
This commit is contained in:
commit
b44f7f85f3
16 changed files with 302 additions and 0 deletions
53
nix/default.nix
Normal file
53
nix/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ dockerTools
|
||||
, bash
|
||||
, cacert
|
||||
, coreutils
|
||||
, curl
|
||||
, gitMinimal
|
||||
, gnutar
|
||||
, gzip
|
||||
, iana-etc
|
||||
, nix
|
||||
, xz
|
||||
}:
|
||||
dockerTools.buildImageWithNixDb {
|
||||
inherit (nix) name;
|
||||
|
||||
contents = [
|
||||
./root
|
||||
coreutils
|
||||
# add /bin/sh
|
||||
bash
|
||||
nix
|
||||
|
||||
# runtime dependencies of nix
|
||||
cacert
|
||||
gitMinimal
|
||||
gnutar
|
||||
gzip
|
||||
xz
|
||||
|
||||
# for haskell binaries
|
||||
iana-etc
|
||||
];
|
||||
|
||||
extraCommands = ''
|
||||
# for /usr/bin/env
|
||||
mkdir usr
|
||||
ln -s ../bin usr/bin
|
||||
|
||||
# make sure /tmp exists
|
||||
mkdir -m 0777 tmp
|
||||
'';
|
||||
|
||||
config = {
|
||||
Cmd = [ "/bin/bash" ];
|
||||
Env = [
|
||||
"ENV=/etc/profile.d/nix.sh"
|
||||
"NIX_PATH=nixpkgs=channel:nixpkgs-unstable"
|
||||
"PAGER=cat"
|
||||
"PATH=/usr/bin:/bin"
|
||||
"SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue