From 6ad7e6fb312a15d05766e4be5723bd1c25d20bf2 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Sun, 7 Jan 2024 10:24:10 +0100 Subject: [PATCH] Revert "gocode: remove" --- pkgs/development/tools/gocode/default.nix | 43 ++++++++++++++++ pkgs/development/tools/gocode/deps.nix | 12 +++++ pkgs/top-level/aliases.nix | 62 ++++++++++------------- pkgs/top-level/all-packages.nix | 2 + 4 files changed, 83 insertions(+), 36 deletions(-) create mode 100644 pkgs/development/tools/gocode/default.nix create mode 100644 pkgs/development/tools/gocode/deps.nix diff --git a/pkgs/development/tools/gocode/default.nix b/pkgs/development/tools/gocode/default.nix new file mode 100644 index 000000000000..687b69cf2027 --- /dev/null +++ b/pkgs/development/tools/gocode/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/development/tools/gocode/deps.nix b/pkgs/development/tools/gocode/deps.nix new file mode 100644 index 000000000000..b2518109171a --- /dev/null +++ b/pkgs/development/tools/gocode/deps.nix @@ -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"; + }; + } +] diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 38b26900f74e..ffa88f60345f 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -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,11 +41,10 @@ let else alias; mapAliases = aliases: - lib.mapAttrs - (n: alias: - removeDistribute - (removeRecurseForDerivations - (checkInPkgs n alias))) + lib.mapAttrs (n: alias: + removeDistribute + (removeRecurseForDerivations + (checkInPkgs n alias))) aliases; in @@ -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 @@ -186,8 +184,8 @@ mapAliases ({ clang16Stdenv = lowPrio llvmPackages_16.stdenv; clang17Stdenv = lowPrio llvmPackages_17.stdenv; - 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-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 ### D ### @@ -216,8 +214,8 @@ mapAliases ({ dotnet-sdk_3 = dotnetCorePackages.sdk_3_1; # Added 2020-01-19 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 - 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_linuxtv = dtv-scan-tables; # Added 2023-03-03 + dtv-scan-tables_tvheadend = dtv-scan-tables; # Added 2023-03-03 dylibbundler = macdylibbundler; # Added 2021-04-24 ### E ### @@ -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; @@ -509,7 +500,7 @@ mapAliases ({ librewolf-wayland = librewolf; # Added 2022-11-15 libseat = seatd; # Added 2021-06-24 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 libtorrentRasterbar = libtorrent-rasterbar; # 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 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 @@ -842,7 +832,7 @@ mapAliases ({ 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-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 qt6ct = qt6Packages.qt6ct; # Added 2023-03-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-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 @@ -1045,7 +1035,7 @@ mapAliases ({ vamp = { vampSDK = vamp-plugin-sdk; }; # Added 2020-03-26 vaapiIntel = intel-vaapi-driver; # Added 2023-05-31 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-full = ventoy-full; # Added 2023-04-12 ViennaRNA = viennarna; # Added 2023-08-23 @@ -1142,7 +1132,7 @@ mapAliases ({ }); /* 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 */ inherit (plasma5Packages) @@ -1165,9 +1155,9 @@ mapAliases ({ plasma-vault plasma-workspace plasma-workspace-wallpapers polkit-kde-agent powerdevil qqc2-breeze-style sddm-kcm skanlite skanpage spectacle 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"; inherit (plasma5Packages.thirdParty) @@ -1178,11 +1168,11 @@ mapAliases ({ kwin-tiling plasma-applet-caffeine-plus plasma-applet-virtual-desktop-bar - ; + ; inherit (libsForQt5) sddm - ; + ; inherit (pidginPackages) pidgin-indicator @@ -1210,6 +1200,6 @@ mapAliases ({ tdlib-purple pidgin-opensteamworks purple-facebook - ; + ; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f62eb68356d9..5ed9b20bf7b5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };