Merge pull request #3066 from cstrahan/gocode

add gocode package
This commit is contained in:
John Wiegley 2014-06-24 15:21:00 -07:00
commit 6776fe077a
3 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "gocode";
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o gocode github.com/nsf/gocode
'';
installPhase = ''
ensureDir $out/bin
mv gocode $out/bin
'';
meta = with lib; {
description = "An autocompletion daemon for the Go programming language";
homepage = https://github.com/nsf/gocode;
license = licenses.mit;
maintainers = with maintainers; [ cstrahan ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,27 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/nsf/gocode";
src = fetchFromGitHub {
owner = "nsf";
repo = "gocode";
rev = "9b760fdb16f18eafbe0cd274527efd2bd89dfa78";
sha256 = "0d1wl0x8jkaav6lcfzs70cr6gy0p88cbk5n3p19l6d0h9xz464ax";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View file

@ -7502,6 +7502,8 @@ let
numactl = callPackage ../os-specific/linux/numactl { };
gocode = callPackage ../development/tools/gocode { };
gogoclient = callPackage ../os-specific/linux/gogoclient { };
nss_ldap = callPackage ../os-specific/linux/nss_ldap { };