Revert "gocode: remove"

This commit is contained in:
Paul Meyer 2024-01-07 10:24:10 +01:00 committed by GitHub
parent c0b4ada237
commit 6ad7e6fb31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 83 additions and 36 deletions

View file

@ -0,0 +1,43 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "gocode-unstable";
version = "2020-04-06";
rev = "4acdcbdea79de6b3dee1c637eca5cbea0fdbe37c";
goPackagePath = "github.com/mdempsky/gocode";
# we must allow references to the original `go` package,
# because `gocode` needs to dig into $GOROOT to provide completions for the
# standard packages.
allowGoReference = true;
src = fetchFromGitHub {
inherit rev;
owner = "mdempsky";
repo = "gocode";
sha256 = "0i1hc089gb6a4mcgg56vn5l0q96wrlza2n08l4349s3dc2j559fb";
};
goDeps = ./deps.nix;
meta = with lib; {
description = "An autocompletion daemon for the Go programming language";
longDescription = ''
Gocode is a helper tool which is intended to be integrated with your
source code editor, like vim, neovim and emacs. It provides several
advanced capabilities, which currently includes:
- Context-sensitive autocompletion
It is called daemon, because it uses client/server architecture for
caching purposes. In particular, it makes autocompletions very fast.
Typical autocompletion time with warm cache is 30ms, which is barely
noticeable.
'';
homepage = "https://github.com/mdempsky/gocode";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
};
}

12
pkgs/development/tools/gocode/deps.nix generated Normal file
View file

@ -0,0 +1,12 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
[
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://go.googlesource.com/tools";
rev = "72e4a01eba4315301fd9ce00c8c2f492580ded8a";
sha256 = "0a8c7j4w784w441j3j3bh640vy1g6g214641qv485wyi0xj49anf";
};
}
]

View file

@ -24,7 +24,7 @@ let
# to appear while listing all the packages available.
removeRecurseForDerivations = alias: with lib;
if alias.recurseForDerivations or false
then removeAttrs alias [ "recurseForDerivations" ]
then removeAttrs alias ["recurseForDerivations"]
else alias;
# Disabling distribution prevents top-level aliases for non-recursed package
@ -41,8 +41,7 @@ let
else alias;
mapAliases = aliases:
lib.mapAttrs
(n: alias:
lib.mapAttrs (n: alias:
removeDistribute
(removeRecurseForDerivations
(checkInPkgs n alias)))
@ -60,7 +59,7 @@ mapAliases ({
a4term = a4; # Added 2023-10-06
aether = throw "aether has been removed from nixpkgs; upstream unmaintained, security issues"; # Added 2023-10-03
airfield = throw "airfield has been removed due to being unmaintained"; # Added 2023-05-19
alertmanager-bot = throw "alertmanager-bot is broken and has been archived by upstream"; # Added 2023-07-28
alertmanager-bot = throw "alertmanager-bot is broken and has been archived by upstream" ; # Added 2023-07-28
alsa-project = throw "alsa-project was removed and its sub-attributes were promoted to top-level."; # Added 2023-11-12
alsaLib = alsa-lib; # Added 2021-06-09
alsaOss = alsa-oss; # Added 2021-06-10
@ -101,8 +100,7 @@ mapAliases ({
bitwig-studio2 = throw "bitwig-studio2 has been removed, you can upgrade to 'bitwig-studio'"; # Added 2023-01-03
blender-with-packages = args:
lib.warn "blender-with-packages is deprecated in favor of blender.withPackages, e.g. `blender.withPackages(ps: [ ps.foobar ])`"
(blender.withPackages (_: args.packages)).overrideAttrs
(lib.optionalAttrs (args ? name) { pname = "blender-" + args.name; }); # Added 2023-10-30
(blender.withPackages (_: args.packages)).overrideAttrs (lib.optionalAttrs (args ? name) { pname = "blender-" + args.name; }); # Added 2023-10-30
bluezFull = throw "'bluezFull' has been renamed to/replaced by 'bluez'"; # Converted to throw 2023-09-10
bookletimposer = throw "bookletimposer has been removed from nixpkgs; upstream unmaintained and broke with pypdf3"; # Added 2024-01-01
boost168 = throw "boost168 has been deprecated in favor of the latest version"; # Added 2023-06-08
@ -332,14 +330,8 @@ mapAliases ({
gnuradio-with-packages = gnuradio3_7.override {
extraPackages = lib.attrVals [
"osmosdr"
"ais"
"gsm"
"nacl"
"rds"
"limesdr"
]
gnuradio3_7Packages;
"osmosdr" "ais" "gsm" "nacl" "rds" "limesdr"
] gnuradio3_7Packages;
}; # Added 2020-10-16
gmock = gtest; # moved from top-level 2021-03-14
@ -365,7 +357,6 @@ mapAliases ({
google-chrome-dev = throw "'google-chrome-dev' has been removed due to the lack of maintenance in nixpkgs. Consider using 'google-chrome' instead."; # Added 2023-10-18
google-gflags = throw "'google-gflags' has been renamed to/replaced by 'gflags'"; # Converted to throw 2023-09-10
go-thumbnailer = thud; # Added 2023-09-21
gocode = throw "'gocode' has been removed as the upstream project was archived. 'gopls' is suggested as replacement"; # Added 2023-12-26
govendor = throw "'govendor' has been removed as it is no longer maintained upstream, please use Go modules instead"; # Added 2023-12-26
gometer = throw "gometer has been removed from nixpkgs because goLance stopped offering Linux support"; # Added 2023-02-10
@ -463,7 +454,7 @@ mapAliases ({
kerberos = libkrb5; # moved from top-level 2021-03-14
kexectools = kexec-tools; # Added 2021-09-03
keysmith = libsForQt5.kdeGear.keysmith; # Added 2021-07-14
kfctl = throw "kfctl is broken and has been archived by upstream"; # Added 2023-08-21
kfctl = throw "kfctl is broken and has been archived by upstream" ; # Added 2023-08-21
kgx = gnome-console; # Added 2022-02-19
kibana7 = throw "Kibana 7.x has been removed from nixpkgs as it depends on an end of life Node.js version and received no maintenance in time."; # Added 2023-30-10
kibana = kibana7;
@ -685,13 +676,12 @@ mapAliases ({
neochat = libsForQt5.kdeGear.neochat; # added 2022-05-10
nitrokey-udev-rules = libnitrokey; # Added 2023-03-25
nix-direnv-flakes = nix-direnv;
nix-repl = throw (
# Added 2018-08-26
nix-repl = throw ( # Added 2018-08-26
"nix-repl has been removed because it's not maintained anymore, " +
"use `nix repl` instead. Also see https://github.com/NixOS/nixpkgs/pull/44903"
);
nix-review = throw "'nix-review' has been renamed to/replaced by 'nixpkgs-review'"; # Converted to throw 2023-09-10
nix-template-rpm = throw "'nix-template-rpm' has been removed as it is broken and unmaintained"; # Added 2023-11-20
nix-template-rpm = throw "'nix-template-rpm' has been removed as it is broken and unmaintained" ; # Added 2023-11-20
nixFlakes = nixVersions.stable; # Added 2021-05-21
nixStable = nixVersions.stable; # Added 2022-01-24
nixUnstable = nixVersions.unstable; # Added 2022-01-26
@ -929,7 +919,7 @@ mapAliases ({
sgtpuzzles = throw "'sgtpuzzles' has been renamed to 'sgt-puzzles'"; # Added 2023-10-06
sgtpuzzles-mobile = throw "'sgtpuzzles-mobile' has been renamed to 'sgt-puzzles-mobile'"; # Added 2023-10-06
inherit (libsForQt5.mauiPackages) shelf; # added 2022-05-17
shhgit = throw "shhgit is broken and is no longer maintained. See https://github.com/eth0izzle/shhgit#-shhgit-is-no-longer-maintained-"; # Added 2023-08-08
shhgit = throw "shhgit is broken and is no longer maintained. See https://github.com/eth0izzle/shhgit#-shhgit-is-no-longer-maintained-" ; # Added 2023-08-08
shipyard = jumppad; # Added 2023-06-06
signumone-ks = throw "signumone-ks has been removed from nixpkgs because the developers stopped offering the binaries"; # Added 2023-08-17
simplenote = throw "'simplenote' has been removed because it is no longer maintained and insecure"; # Added 2023-10-09

View file

@ -28378,6 +28378,8 @@ with pkgs;
go-outline = callPackage ../development/tools/go-outline { };
gocode = callPackage ../development/tools/gocode { };
gocode-gomod = callPackage ../development/tools/gocode-gomod { };
goconst = callPackage ../development/tools/goconst { };