go-packages: Fix version string output

This commit is contained in:
William A. Kennington III 2015-09-08 15:54:07 -07:00
parent 71ec4dbd45
commit a403f130b6

View file

@ -8,7 +8,7 @@ let
buildFromGitHub = { rev, date ? null, owner, repo, sha256, name ? repo, goPackagePath ? "github.com/${owner}/${repo}", ... }@args: buildGoPackage (args // {
inherit rev goPackagePath;
name = "${name}-${if date != null then date else stdenv.lib.strings.substring 0 7 rev}";
name = "${name}-${if date != null then date else if builtins.stringLength rev != 40 then rev else stdenv.lib.strings.substring 0 7 rev}";
src = fetchFromGitHub { inherit rev owner repo sha256; };
});