conduwuit/nix/pkgs/oci-image/default.nix
strawberry 6cbaef2d12 always set RUST_BACKTRACE=full in OCI images
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-02 13:17:31 -04:00

32 lines
576 B
Nix

{ inputs
# Dependencies
, dockerTools
, lib
, main
, stdenv
, tini
}:
dockerTools.buildLayeredImage {
name = main.pname;
tag = "main";
created = "@${toString inputs.self.lastModified}";
contents = [
dockerTools.caCertificates
];
config = {
Entrypoint = if !stdenv.hostPlatform.isDarwin
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT)
# are handled as expected
then [ "${lib.getExe' tini "tini"}" "--" ]
else [];
Cmd = [
"${lib.getExe main}"
];
Env = [
"RUST_BACKTRACE=full"
];
};
}