Skip to content

Commit bef413e

Browse files
committed
podman: fix cross compilation build
- See `Nixpkgs` issue 467994 for detailed build logs showing the failure. - `Podman` will use its vendored version of `go-md2man` when the `GOMD2MAN` environment variable is unset. - When cross compiling from `x86_64-linux` to `aarch64-linux`, this results in the tool being compiled with the `aarch64-linux` compiler using `x86_64-linux` options. The compiler arch is wrong, so the build fails. - To circumvent this use `Nixpkgs` version of `go-md2man`. - The current vendored version matches `Nixpkgs` version (v2.0.7): containers/podman@7e14a03 - The reason for the vendoring is detailed in this commit: containers/podman@dfec510 (cherry picked from commit 0dd94f0)
1 parent 33c80e5 commit bef413e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkgs/by-name/po/podman/package.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
pkg-config,
66
installShellFiles,
77
buildGoModule,
8+
buildPackages,
89
gpgme,
910
lvm2,
1011
btrfs-progs,
1112
libapparmor,
1213
libseccomp,
1314
libselinux,
1415
systemd,
15-
go-md2man,
1616
nixosTests,
1717
python3,
1818
makeBinaryWrapper,
@@ -70,7 +70,6 @@ buildGoModule (finalAttrs: {
7070

7171
nativeBuildInputs = [
7272
pkg-config
73-
go-md2man
7473
installShellFiles
7574
makeBinaryWrapper
7675
python3
@@ -89,6 +88,7 @@ buildGoModule (finalAttrs: {
8988
env = {
9089
HELPER_BINARIES_DIR = "${placeholder "out"}/libexec/podman"; # used in buildPhase & installPhase
9190
PREFIX = "${placeholder "out"}";
91+
GOMD2MAN = "${buildPackages.go-md2man}/bin/go-md2man";
9292
};
9393

9494
buildPhase = ''

0 commit comments

Comments
 (0)