Unverified Commit 7d5dcd00 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

skopeo: fix cross compilaton (#424254)

parents 290bbab1 949ccb68
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -51,17 +51,28 @@ buildGoModule rec {
      btrfs-progs
    ];

  buildPhase = ''
  buildPhase =
    ''
      runHook preBuild
      patchShebangs .
    make bin/skopeo completions docs
      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 ''