cri-o: switch to buildGoModule

This is just a cleanup to switch from buildGoPackage to buildGoModule.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert 2020-04-30 09:09:40 +02:00
parent 1694c0b3f7
commit 006e6b052f
No known key found for this signature in database
GPG key ID: 8CE029DD1A866E52

View file

@ -1,6 +1,6 @@
{ stdenv { stdenv
, btrfs-progs , btrfs-progs
, buildGoPackage , buildGoModule
, fetchFromGitHub , fetchFromGitHub
, glibc , glibc
, gpgme , gpgme
@ -14,21 +14,18 @@
, pkg-config , pkg-config
}: }:
buildGoPackage rec { buildGoModule rec {
pname = "cri-o"; pname = "cri-o";
version = "1.18.0"; version = "1.18.0";
goPackagePath = "github.com/cri-o/cri-o";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cri-o"; owner = "cri-o";
repo = "cri-o"; repo = "cri-o";
rev = "v${version}"; rev = "v${version}";
sha256 = "142flmv54pj48rjqkd26fbxrcbx2cv6pdmrc33jgyvn6r99zliah"; sha256 = "142flmv54pj48rjqkd26fbxrcbx2cv6pdmrc33jgyvn6r99zliah";
}; };
vendorSha256 = null;
outputs = [ "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ installShellFiles pkg-config ]; nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [ buildInputs = [
@ -44,8 +41,6 @@ buildGoPackage rec {
BUILDTAGS = "apparmor seccomp selinux containers_image_ostree_stub"; BUILDTAGS = "apparmor seccomp selinux containers_image_ostree_stub";
buildPhase = '' buildPhase = ''
pushd go/src/${goPackagePath}
sed -i '/version.buildDate/d' Makefile sed -i '/version.buildDate/d' Makefile
make binaries docs BUILDTAGS="$BUILDTAGS" make binaries docs BUILDTAGS="$BUILDTAGS"