summary refs log tree commit diff
path: root/pkgs/development/tools/gocode/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/gocode/default.nix')
-rw-r--r--pkgs/development/tools/gocode/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/tools/gocode/default.nix b/pkgs/development/tools/gocode/default.nix
new file mode 100644
index 00000000000..30e4b79ee38
--- /dev/null
+++ b/pkgs/development/tools/gocode/default.nix
@@ -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 = ''
+    mkdir -p $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;
+  };
+}