skopeo: switch to buildGoModule

This commit is contained in:
zowoq 2020-05-14 17:36:03 +10:00
parent fbdc10572d
commit e56116f752

View File

@ -1,5 +1,5 @@
{ stdenv
, buildGoPackage
, buildGoModule
, fetchFromGitHub
, runCommand
, gpgme
@ -26,18 +26,18 @@ let
defaultPolicyFile = runCommand "skopeo-default-policy.json" {} "cp ${src}/default-policy.json $out";
goPackagePath = "github.com/containers/skopeo";
vendorPath = "${goPackagePath}/vendor/github.com/containers/image/v5";
vendorPath = "github.com/containers/skopeo/vendor/github.com/containers/image/v5";
in
buildGoPackage {
buildGoModule {
pname = "skopeo";
inherit version;
inherit src goPackagePath;
inherit src;
outputs = [ "out" "man" ];
vendorSha256 = null;
excludedPackages = [ "integration" ];
nativeBuildInputs = [ pkg-config go-md2man installShellFiles makeWrapper ];
@ -51,11 +51,8 @@ buildGoPackage {
'';
postBuild = ''
# depends on buildGoPackage not changing …
pushd ./go/src/${goPackagePath}
make install-docs MANINSTALLDIR="$man/share/man"
installShellCompletion --bash completions/bash/skopeo
popd
'';
postInstall = stdenv.lib.optionals stdenv.isLinux ''