containerd: fix --version output
Before this change, 'containerd --version' with the nix package wouldn't print useful version information. In addition, the build output a bunch of (harmless) errors about 'git: command not found'. This fixes both of those problems.
This commit is contained in:
parent
c652b64a26
commit
6d3eaa0527
@ -5,6 +5,8 @@ with lib;
|
|||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "containerd";
|
pname = "containerd";
|
||||||
version = "1.2.13";
|
version = "1.2.13";
|
||||||
|
# git commit for the above version's tag
|
||||||
|
commit = "7ad184331fa3e55e52b890ea95e65ba581ae3429";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "containerd";
|
owner = "containerd";
|
||||||
@ -20,7 +22,7 @@ buildGoPackage rec {
|
|||||||
|
|
||||||
buildInputs = [ btrfs-progs ];
|
buildInputs = [ btrfs-progs ];
|
||||||
|
|
||||||
buildFlags = [ "VERSION=v${version}" ];
|
buildFlags = [ "VERSION=v${version}" "REVISION=${commit}" ];
|
||||||
|
|
||||||
BUILDTAGS = []
|
BUILDTAGS = []
|
||||||
++ optional (btrfs-progs == null) "no_btrfs";
|
++ optional (btrfs-progs == null) "no_btrfs";
|
||||||
@ -28,7 +30,7 @@ buildGoPackage rec {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd go/src/${goPackagePath}
|
cd go/src/${goPackagePath}
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
make binaries
|
make binaries $buildFlags
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user