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