From 6d3eaa0527fc02c486889364afe148809834f40f Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Tue, 14 Apr 2020 22:31:57 -0700 Subject: [PATCH] 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. --- pkgs/applications/virtualization/containerd/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/containerd/default.nix b/pkgs/applications/virtualization/containerd/default.nix index 7ce4390ba30..15e5c05c1dd 100644 --- a/pkgs/applications/virtualization/containerd/default.nix +++ b/pkgs/applications/virtualization/containerd/default.nix @@ -5,6 +5,8 @@ with lib; buildGoPackage rec { pname = "containerd"; version = "1.2.13"; + # git commit for the above version's tag + commit = "7ad184331fa3e55e52b890ea95e65ba581ae3429"; src = fetchFromGitHub { owner = "containerd"; @@ -20,7 +22,7 @@ buildGoPackage rec { buildInputs = [ btrfs-progs ]; - buildFlags = [ "VERSION=v${version}" ]; + buildFlags = [ "VERSION=v${version}" "REVISION=${commit}" ]; BUILDTAGS = [] ++ optional (btrfs-progs == null) "no_btrfs"; @@ -28,7 +30,7 @@ buildGoPackage rec { buildPhase = '' cd go/src/${goPackagePath} patchShebangs . - make binaries + make binaries $buildFlags ''; installPhase = ''