mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 21:21:06 +00:00
commit
6776fe077a
29
pkgs/development/tools/gocode/default.nix
Normal file
29
pkgs/development/tools/gocode/default.nix
Normal 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;
|
||||
};
|
||||
}
|
27
pkgs/development/tools/gocode/deps.nix
Normal file
27
pkgs/development/tools/gocode/deps.nix
Normal 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);
|
||||
}
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue