1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

add gocode package

This commit is contained in:
Charles Strahan 2014-06-23 05:49:58 -04:00
parent 7301dd44de
commit f76fbe03e0
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

@ -7494,6 +7494,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 { };