Merge pull request #8135 from sofuture/fix-goimports-build

Fix goimports build
This commit is contained in:
lethalman 2015-06-03 10:47:55 +02:00
commit 219b9a63ad

View File

@ -1,11 +1,12 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
with goPackages;
buildGoPackage rec {
rev = "7534f4943d94a318edde90212439e538ed54cdde";
version = "git-2015-04-26";
name = "goimports-${version}";
buildInputs = [ go ];
goPackagePath = "golang.org/x/tools";
src = fetchFromGitHub {
inherit rev;
@ -14,15 +15,9 @@ stdenv.mkDerivation rec {
sha256 = "12ybykrn92l7awav0wkx9yqpc5z0pdwwi29qs9mdr2xspx61rb50";
};
buildPhase = ''
export GOPATH=$src
go build -v -o goimports golang.org/x/tools/cmd/goimports
'';
subPackages = [ "cmd/goimports" ];
installPhase = ''
mkdir -p $out/bin
mv goimports $out/bin
'';
dontInstallSrc = true;
meta = with lib; {
description = "Import management tool for go";