skopeo: fix cross compilaton (#424254)

This commit is contained in:
Aleksana
2025-07-12 22:25:17 +08:00
committed by GitHub
+18 -7
View File
@@ -51,17 +51,28 @@ buildGoModule rec {
btrfs-progs
];
buildPhase = ''
runHook preBuild
patchShebangs .
make bin/skopeo completions docs
runHook postBuild
'';
buildPhase =
''
runHook preBuild
patchShebangs .
make bin/skopeo docs
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
make completions
''
+ ''
runHook postBuild
'';
installPhase =
''
runHook preInstall
PREFIX=${placeholder "out"} make install-binary install-completions install-docs
PREFIX=${placeholder "out"} make install-binary install-docs
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
PREFIX=${placeholder "out"} make install-completions
''
+ ''
install ${passthru.policy}/default-policy.json -Dt $out/etc/containers
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''