add gopls

This commit is contained in:
Cadey Ratio 2020-02-10 21:39:06 +00:00
parent 880ed5437a
commit 71488e7dd4
4 changed files with 250 additions and 2 deletions

View File

@ -15,6 +15,9 @@ let
johaus = callPackage ./pkgs/johaus { };
jvozba = callPackage ./pkgs/jvozba { };
# Go tools
gopls = callPackage ./pkgs/gopls { };
# x
appsluggr = x.appsluggr;
license = x.license;

18
pkgs/gopls/default.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs ? import <nixpkgs> { } }:
let
repo = pkgs.fetchFromGitHub {
owner = "golang";
repo = "tools";
rev = "1ace956b0e17ff85a6f9bdf6973af28a26234113";
hash = "sha256:1fdhfil59w1nvz23x1qsvlpwl3yilifx6lvimnlg9r3fbzmhmqjh";
};
out = pkgs.buildGoPackage {
name = "gopls-git";
goPackagePath = "golang.org/x/tools";
src = repo;
goDeps = ./deps.nix;
modSha256 = "sha256:07gdrkdsaj78f9b6aigxqf0j46km5s39m1aswj10aj5bwdd9klid";
subPackages = [ "gopls" ];
};
in out

228
pkgs/gopls/deps.nix Normal file
View File

@ -0,0 +1,228 @@
# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
[
{
goPackagePath = "github.com/BurntSushi/toml";
fetch = {
type = "git";
url = "https://github.com/BurntSushi/toml";
rev = "v0.3.1";
sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.0";
sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
};
}
{
goPackagePath = "github.com/google/renameio";
fetch = {
type = "git";
url = "https://github.com/google/renameio";
rev = "v0.1.0";
sha256 = "1ki2x5a9nrj17sn092d6n4zr29lfg5ydv4xz5cp58z6cw8ip43jx";
};
}
{
goPackagePath = "github.com/kisielk/gotool";
fetch = {
type = "git";
url = "https://github.com/kisielk/gotool";
rev = "v1.0.0";
sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn";
};
}
{
goPackagePath = "github.com/kr/pretty";
fetch = {
type = "git";
url = "https://github.com/kr/pretty";
rev = "v0.1.0";
sha256 = "18m4pwg2abd0j9cn5v3k2ksk9ig4vlwxmlw9rrglanziv9l967qp";
};
}
{
goPackagePath = "github.com/kr/pty";
fetch = {
type = "git";
url = "https://github.com/kr/pty";
rev = "v1.1.1";
sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6";
};
}
{
goPackagePath = "github.com/kr/text";
fetch = {
type = "git";
url = "https://github.com/kr/text";
rev = "v0.1.0";
sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "v1.0.0";
sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
};
}
{
goPackagePath = "github.com/rogpeppe/go-internal";
fetch = {
type = "git";
url = "https://github.com/rogpeppe/go-internal";
rev = "v1.3.0";
sha256 = "0mcdh1licgnnahwml9y2iq6xy5x9xmjw5frcnds2s3wpjyqrl216";
};
}
{
goPackagePath = "github.com/sergi/go-diff";
fetch = {
type = "git";
url = "https://github.com/sergi/go-diff";
rev = "v1.0.0";
sha256 = "0swiazj8wphs2zmk1qgq75xza6m19snif94h2m6fi8dqkwqdl7c7";
};
}
{
goPackagePath = "github.com/stretchr/objx";
fetch = {
type = "git";
url = "https://github.com/stretchr/objx";
rev = "v0.1.0";
sha256 = "19ynspzjdynbi85xw06mh8ad5j0qa1vryvxjgvbnyrr8rbm4vd8w";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.4.0";
sha256 = "187i5g88sxfy4vxpm7dw1gwv29pa2qaq475lxrdh5livh69wqfjb";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "87dc89f01550";
sha256 = "0z4i1m2yn3f31ci7wvcm2rxkx2yiv7a78mfzklncmsz2k97rlh2g";
};
}
{
goPackagePath = "golang.org/x/mod";
fetch = {
type = "git";
url = "https://go.googlesource.com/mod";
rev = "c90efee705ee";
sha256 = "0i5md645rmcy5z5ij9ng428k9rz4g3k1kjy3blsq1264rn426gdf";
};
}
{
goPackagePath = "golang.org/x/net";
fetch = {
type = "git";
url = "https://go.googlesource.com/net";
rev = "3b0461eec859";
sha256 = "0l00c8l0a8xnv6qdpwfzxxsr58jggacgzdrwiprrfx2xqm37b6d5";
};
}
{
goPackagePath = "golang.org/x/sync";
fetch = {
type = "git";
url = "https://go.googlesource.com/sync";
rev = "112230192c58";
sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "97732733099d";
sha256 = "118hkp01i4z1f5h6hcjm0ff2ngqhrzj1f7731n0kw8dr6hvbx0sw";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "v0.3.0";
sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
};
}
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://go.googlesource.com/tools";
rev = "a3bc800455d5";
sha256 = "1yn8kv7fz9mfs885ckashc4c2sml1vndzmmvzkky6dpf4jpq8ig0";
};
}
{
goPackagePath = "golang.org/x/xerrors";
fetch = {
type = "git";
url = "https://go.googlesource.com/xerrors";
rev = "1b5146add898";
sha256 = "0w2akj91krxjag0xdhsg78470888nicc5ismc2ap9jqpss6v1zih";
};
}
{
goPackagePath = "gopkg.in/check.v1";
fetch = {
type = "git";
url = "https://gopkg.in/check.v1";
rev = "788fd7840127";
sha256 = "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a";
};
}
{
goPackagePath = "gopkg.in/errgo.v2";
fetch = {
type = "git";
url = "https://gopkg.in/errgo.v2";
rev = "v2.1.0";
sha256 = "065mbihiy7q67wnql0bzl9y1kkvck5ivra68254zbih52jxwrgr2";
};
}
{
goPackagePath = "gopkg.in/yaml.v2";
fetch = {
type = "git";
url = "https://gopkg.in/yaml.v2";
rev = "v2.2.2";
sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
};
}
{
goPackagePath = "honnef.co/go/tools";
fetch = {
type = "git";
url = "https://github.com/dominikh/go-tools";
rev = "v0.0.1-2019.2.3";
sha256 = "1rwwahmbs4dwxncwjj56likir1kps9937vm2id3rygxzzla40zal";
};
}
{
goPackagePath = "mvdan.cc/xurls";
fetch = {
type = "git";
url = "https://github.com/mvdan/xurls";
rev = "v2.1.0";
sha256 = "1cwl52vcmhxnnx33pqd3cprw6yjv988qhyf42d4sblw7l2gqgilc";
};
}
]

View File

@ -16,8 +16,7 @@ let
modSha256 = "sha256-mTzZcEoag1/1IAZCSY7MLgNS+lI453GM8SM1aFVLKUU=";
CGO_ENABLED="0";
# TODO: remove references to go in the non-default output
allowGoReference = false;
allowGoReference = true;
subPackages = [
"cmd/appsluggr"