Skip to content

Commit f5e04cc

Browse files
authored
chore(voyager): run strip on plugins and modules (#4154)
2 parents bc7db5f + f95439f commit f5e04cc

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

lib/embed-commit/default.nix

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
_: {
22
perSystem =
3-
{ crane, pkgs, ... }:
3+
{ crane, ... }:
44
{
5-
packages = crane.buildWorkspaceMember "lib/embed-commit/verifier" {
6-
# extraNativeBuildInputs = [ pkgs.cmake ];
7-
};
5+
packages = crane.buildWorkspaceMember "lib/embed-commit/verifier" { };
86
};
97
}

tools/rust/crane.nix

+11
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@
222222
# installPhase to be passed to the cargo build derivation.
223223
cargoBuildInstallPhase ? null,
224224

225+
# standard postBuild phase.
226+
postBuild ? null,
227+
# standard postInstall phase.
228+
postInstall ? null,
229+
225230
# extra environment variables to pass to the derivation.
226231
extraEnv ? { },
227232
# extra environment variables to pass to the derivation, only for crane.buildPackage.
@@ -412,6 +417,12 @@
412417
// (lib.optionalAttrs (cargoBuildInstallPhase != null) {
413418
installPhaseCommand = cargoBuildInstallPhase;
414419
})
420+
// (lib.optionalAttrs (postBuild != null) {
421+
inherit postBuild;
422+
})
423+
// (lib.optionalAttrs (postInstall != null) {
424+
inherit postInstall;
425+
})
415426
// (lib.optionalAttrs (cargoBuildCheckPhase != null) {
416427
checkPhase = cargoBuildCheckPhase;
417428
})

voyager/voyager.nix

+9-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@
3434
pkgs.symlinkJoin {
3535
name = "voyager-modules-plugins";
3636
paths = pkgs.lib.mapAttrsToList (_: path: if release then path.release else path) (
37-
builtins.foldl' (acc: p: acc // (crane.buildWorkspaceMember p { })) { } voy-modules-list
37+
builtins.foldl' (
38+
acc: p:
39+
acc
40+
// (crane.buildWorkspaceMember p {
41+
postInstall = ''
42+
strip $out/bin/*
43+
'';
44+
})
45+
) { } voy-modules-list
3846
);
3947
postBuild = ''
4048
rm $out/lib -r

0 commit comments

Comments
 (0)