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. # to appear while listing all the packages available.
removeRecurseForDerivations = alias: with lib; removeRecurseForDerivations = alias: with lib;
if alias.recurseForDerivations or false if alias.recurseForDerivations or false
then removeAttrs alias [ "recurseForDerivations" ] then removeAttrs alias ["recurseForDerivations"]
else alias; else alias;
# Disabling distribution prevents top-level aliases for non-recursed package # Disabling distribution prevents top-level aliases for non-recursed package
@ -41,11 +41,10 @@ let
else alias; else alias;
mapAliases = aliases: mapAliases = aliases:
lib.mapAttrs lib.mapAttrs (n: alias:
(n: alias: removeDistribute
removeDistribute (removeRecurseForDerivations
(removeRecurseForDerivations (checkInPkgs n alias)))
(checkInPkgs n alias)))
aliases; aliases;
in in
@ -60,7 +59,7 @@ mapAliases ({
a4term = a4; # Added 2023-10-06 a4term = a4; # Added 2023-10-06
aether = throw "aether has been removed from nixpkgs; upstream unmaintained, security issues"; # Added 2023-10-03 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 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 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 alsaLib = alsa-lib; # Added 2021-06-09
alsaOss = alsa-oss; # Added 2021-06-10 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 bitwig-studio2 = throw "bitwig-studio2 has been removed, you can upgrade to 'bitwig-studio'"; # Added 2023-01-03
blender-with-packages = args: blender-with-packages = args:
lib.warn "blender-with-packages is deprecated in favor of blender.withPackages, e.g. `blender.withPackages(ps: [ ps.foobar ])`" lib.warn "blender-with-packages is deprecated in favor of blender.withPackages, e.g. `blender.withPackages(ps: [ ps.foobar ])`"
(blender.withPackages (_: args.packages)).overrideAttrs (blender.withPackages (_: args.packages)).overrideAttrs (lib.optionalAttrs (args ? name) { pname = "blender-" + args.name; }); # Added 2023-10-30
(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 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 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 boost168 = throw "boost168 has been deprecated in favor of the latest version"; # Added 2023-06-08
@ -186,8 +184,8 @@ mapAliases ({
clang16Stdenv = lowPrio llvmPackages_16.stdenv; clang16Stdenv = lowPrio llvmPackages_16.stdenv;
clang17Stdenv = lowPrio llvmPackages_17.stdenv; clang17Stdenv = lowPrio llvmPackages_17.stdenv;
clang-tools_7 = throw "clang-tools_7 has been removed from nixpkgs"; # Added 2023-11-19 clang-tools_7 = throw "clang-tools_7 has been removed from nixpkgs"; # Added 2023-11-19
clang_7 = throw "clang_7 has been removed from nixpkgs"; # Added 2023-11-19 clang_7 = throw "clang_7 has been removed from nixpkgs"; # Added 2023-11-19
### D ### ### D ###
@ -216,8 +214,8 @@ mapAliases ({
dotnet-sdk_3 = dotnetCorePackages.sdk_3_1; # Added 2020-01-19 dotnet-sdk_3 = dotnetCorePackages.sdk_3_1; # Added 2020-01-19
dotnet-sdk_5 = dotnetCorePackages.sdk_5_0; # Added 2020-09-11 dotnet-sdk_5 = dotnetCorePackages.sdk_5_0; # Added 2020-09-11
drgeo = throw "'drgeo' has been removed as it is outdated and unmaintained"; # Added 2023-10-15 drgeo = throw "'drgeo' has been removed as it is outdated and unmaintained"; # Added 2023-10-15
dtv-scan-tables_linuxtv = dtv-scan-tables; # Added 2023-03-03 dtv-scan-tables_linuxtv = dtv-scan-tables; # Added 2023-03-03
dtv-scan-tables_tvheadend = dtv-scan-tables; # Added 2023-03-03 dtv-scan-tables_tvheadend = dtv-scan-tables; # Added 2023-03-03
dylibbundler = macdylibbundler; # Added 2021-04-24 dylibbundler = macdylibbundler; # Added 2021-04-24
### E ### ### E ###
@ -332,14 +330,8 @@ mapAliases ({
gnuradio-with-packages = gnuradio3_7.override { gnuradio-with-packages = gnuradio3_7.override {
extraPackages = lib.attrVals [ extraPackages = lib.attrVals [
"osmosdr" "osmosdr" "ais" "gsm" "nacl" "rds" "limesdr"
"ais" ] gnuradio3_7Packages;
"gsm"
"nacl"
"rds"
"limesdr"
]
gnuradio3_7Packages;
}; # Added 2020-10-16 }; # Added 2020-10-16
gmock = gtest; # moved from top-level 2021-03-14 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-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 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 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 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 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 kerberos = libkrb5; # moved from top-level 2021-03-14
kexectools = kexec-tools; # Added 2021-09-03 kexectools = kexec-tools; # Added 2021-09-03
keysmith = libsForQt5.kdeGear.keysmith; # Added 2021-07-14 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 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 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; kibana = kibana7;
@ -509,7 +500,7 @@ mapAliases ({
librewolf-wayland = librewolf; # Added 2022-11-15 librewolf-wayland = librewolf; # Added 2022-11-15
libseat = seatd; # Added 2021-06-24 libseat = seatd; # Added 2021-06-24
libsigcxx12 = throw "'libsigcxx12' has been removed, please use newer versions"; # Added 2023-10-20 libsigcxx12 = throw "'libsigcxx12' has been removed, please use newer versions"; # Added 2023-10-20
libsForQt515 = libsForQt5; # Added 2022-11-24 libsForQt515 = libsForQt5; # Added 2022-11-24
libtensorflow-bin = libtensorflow; # Added 2022-09-25 libtensorflow-bin = libtensorflow; # Added 2022-09-25
libtorrentRasterbar = libtorrent-rasterbar; # Added 2020-12-20 libtorrentRasterbar = libtorrent-rasterbar; # Added 2020-12-20
libtorrentRasterbar-1_2_x = libtorrent-rasterbar-1_2_x; # Added 2020-12-20 libtorrentRasterbar-1_2_x = libtorrent-rasterbar-1_2_x; # Added 2020-12-20
@ -685,13 +676,12 @@ mapAliases ({
neochat = libsForQt5.kdeGear.neochat; # added 2022-05-10 neochat = libsForQt5.kdeGear.neochat; # added 2022-05-10
nitrokey-udev-rules = libnitrokey; # Added 2023-03-25 nitrokey-udev-rules = libnitrokey; # Added 2023-03-25
nix-direnv-flakes = nix-direnv; nix-direnv-flakes = nix-direnv;
nix-repl = throw ( nix-repl = throw ( # Added 2018-08-26
# Added 2018-08-26
"nix-repl has been removed because it's not maintained anymore, " + "nix-repl has been removed because it's not maintained anymore, " +
"use `nix repl` instead. Also see https://github.com/NixOS/nixpkgs/pull/44903" "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-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 nixFlakes = nixVersions.stable; # Added 2021-05-21
nixStable = nixVersions.stable; # Added 2022-01-24 nixStable = nixVersions.stable; # Added 2022-01-24
nixUnstable = nixVersions.unstable; # Added 2022-01-26 nixUnstable = nixVersions.unstable; # Added 2022-01-26
@ -842,7 +832,7 @@ mapAliases ({
qlandkartegt = throw "'qlandkartegt' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-04-17 qlandkartegt = throw "'qlandkartegt' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-04-17
qscintilla = libsForQt5.qscintilla; # Added 2023-09-20 qscintilla = libsForQt5.qscintilla; # Added 2023-09-20
qscintilla-qt6 = qt6Packages.qscintilla; # Added 2023-09-20 qscintilla-qt6 = qt6Packages.qscintilla; # Added 2023-09-20
qt515 = qt5; # Added 2022-11-24 qt515 = qt5; # Added 2022-11-24
qt5ct = libsForQt5.qt5ct; # Added 2021-12-27 qt5ct = libsForQt5.qt5ct; # Added 2021-12-27
qt6ct = qt6Packages.qt6ct; # Added 2023-03-07 qt6ct = qt6Packages.qt6ct; # Added 2023-03-07
qtcurve = libsForQt5.qtcurve; # Added 2020-11-07 qtcurve = libsForQt5.qtcurve; # Added 2020-11-07
@ -929,7 +919,7 @@ mapAliases ({
sgtpuzzles = throw "'sgtpuzzles' has been renamed to 'sgt-puzzles'"; # Added 2023-10-06 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 sgtpuzzles-mobile = throw "'sgtpuzzles-mobile' has been renamed to 'sgt-puzzles-mobile'"; # Added 2023-10-06
inherit (libsForQt5.mauiPackages) shelf; # added 2022-05-17 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 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 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 simplenote = throw "'simplenote' has been removed because it is no longer maintained and insecure"; # Added 2023-10-09
@ -1045,7 +1035,7 @@ mapAliases ({
vamp = { vampSDK = vamp-plugin-sdk; }; # Added 2020-03-26 vamp = { vampSDK = vamp-plugin-sdk; }; # Added 2020-03-26
vaapiIntel = intel-vaapi-driver; # Added 2023-05-31 vaapiIntel = intel-vaapi-driver; # Added 2023-05-31
vaultwarden-vault = vaultwarden.webvault; # Added 2022-12-13 vaultwarden-vault = vaultwarden.webvault; # Added 2022-12-13
vdirsyncerStable = vdirsyncer; # Added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168 vdirsyncerStable = vdirsyncer; # Added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168
ventoy-bin = ventoy; # Added 2023-04-12 ventoy-bin = ventoy; # Added 2023-04-12
ventoy-bin-full = ventoy-full; # Added 2023-04-12 ventoy-bin-full = ventoy-full; # Added 2023-04-12
ViennaRNA = viennarna; # Added 2023-08-23 ViennaRNA = viennarna; # Added 2023-08-23
@ -1142,7 +1132,7 @@ mapAliases ({
}); });
/* If these are in the scope of all-packages.nix, they cause collisions /* If these are in the scope of all-packages.nix, they cause collisions
between mixed versions of qt. See: between mixed versions of qt. See:
https://github.com/NixOS/nixpkgs/pull/101369 */ https://github.com/NixOS/nixpkgs/pull/101369 */
inherit (plasma5Packages) inherit (plasma5Packages)
@ -1165,9 +1155,9 @@ mapAliases ({
plasma-vault plasma-workspace plasma-workspace-wallpapers polkit-kde-agent plasma-vault plasma-workspace plasma-workspace-wallpapers polkit-kde-agent
powerdevil qqc2-breeze-style sddm-kcm skanlite skanpage spectacle powerdevil qqc2-breeze-style sddm-kcm skanlite skanpage spectacle
systemsettings xdg-desktop-portal-kde yakuake zanshin systemsettings xdg-desktop-portal-kde yakuake zanshin
; ;
kalendar = merkuro; # Renamed in 23.08 kalendar = merkuro; # Renamed in 23.08
kfloppy = throw "kfloppy has been removed upstream in KDE Gear 23.08"; kfloppy = throw "kfloppy has been removed upstream in KDE Gear 23.08";
inherit (plasma5Packages.thirdParty) inherit (plasma5Packages.thirdParty)
@ -1178,11 +1168,11 @@ mapAliases ({
kwin-tiling kwin-tiling
plasma-applet-caffeine-plus plasma-applet-caffeine-plus
plasma-applet-virtual-desktop-bar plasma-applet-virtual-desktop-bar
; ;
inherit (libsForQt5) inherit (libsForQt5)
sddm sddm
; ;
inherit (pidginPackages) inherit (pidginPackages)
pidgin-indicator pidgin-indicator
@ -1210,6 +1200,6 @@ mapAliases ({
tdlib-purple tdlib-purple
pidgin-opensteamworks pidgin-opensteamworks
purple-facebook purple-facebook
; ;
}) })

View File

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