-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
I have project bar that is a library with a Rust FFI.
I have project foo that imports bar in the standard way:
perSystem = {
...
}: {
haskellProjects.default = {
imports = [
inputs.bar.haskellFlakeProjectModules.output
];
settings = {
foo = {
self,
super,
...
}: {
justStaticExecutables = true;
removeReferencesTo = [
self.bar
];
};
};
};
};The Docker image derivation is:
packages.dockerImage = pkgs.dockerTools.buildImage {
name = "foo";
created = "now";
tag = "0.1";
copyToRoot = pkgs.buildEnv {
paths = with pkgs; [
self'.packages.default
];
name = "foo-root";
pathsToLink = ["/bin"];
};
config = {
Cmd = ["${self'.packages.default}/bin/foo"];
};
};This produces an image that contains only executables and libraries for Haskell. It includes all the source of the Rust packages the bar library needs to build.
Any ideas on how to slim down this image?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels