From e4b89c06c398e3b89730bad725c838dc3ca27816 Mon Sep 17 00:00:00 2001 From: midchildan Date: Sun, 14 Aug 2022 17:08:52 +0900 Subject: [PATCH] sourcetrail: remove --- .../editors/vim/plugins/aliases.nix | 1 + .../editors/vim/plugins/generated.nix | 12 - .../editors/vim/plugins/vim-plugin-names | 1 - .../development/tools/sourcetrail/default.nix | 275 ------------------ .../sourcetrail/disable-failing-tests.patch | 48 --- .../tools/sourcetrail/disable-updates.patch | 13 - pkgs/development/tools/sourcetrail/java.nix | 28 -- pkgs/development/tools/sourcetrail/jedi.nix | 36 --- pkgs/development/tools/sourcetrail/parso.nix | 29 -- pkgs/development/tools/sourcetrail/python.nix | 72 ----- pkgs/top-level/aliases.nix | 2 + pkgs/top-level/all-packages.nix | 10 - 12 files changed, 3 insertions(+), 524 deletions(-) delete mode 100644 pkgs/development/tools/sourcetrail/default.nix delete mode 100644 pkgs/development/tools/sourcetrail/disable-failing-tests.patch delete mode 100644 pkgs/development/tools/sourcetrail/disable-updates.patch delete mode 100644 pkgs/development/tools/sourcetrail/java.nix delete mode 100644 pkgs/development/tools/sourcetrail/jedi.nix delete mode 100644 pkgs/development/tools/sourcetrail/parso.nix delete mode 100644 pkgs/development/tools/sourcetrail/python.nix diff --git a/pkgs/applications/editors/vim/plugins/aliases.nix b/pkgs/applications/editors/vim/plugins/aliases.nix index 955590cafe31..d7db61d42839 100644 --- a/pkgs/applications/editors/vim/plugins/aliases.nix +++ b/pkgs/applications/editors/vim/plugins/aliases.nix @@ -130,6 +130,7 @@ mapAliases (with prev; { unite = unite-vim; UltiSnips = ultisnips; vim-addon-vim2nix = vim2nix; + vim-sourcetrail = throw "vim-sourcetrail has been removed: abandoned by upstream"; # Added 2022-08-14 vimproc = vimproc-vim; vimshell = vimshell-vim; vinegar = vim-vinegar; diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 38f9e8c10513..a6f5c1ba8ee0 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -11540,18 +11540,6 @@ final: prev: meta.homepage = "https://github.com/christoomey/vim-sort-motion/"; }; - vim-sourcetrail = buildVimPluginFrom2Nix { - pname = "vim-sourcetrail"; - version = "2021-02-16"; - src = fetchFromGitHub { - owner = "CoatiSoftware"; - repo = "vim-sourcetrail"; - rev = "c9c621a7ab81c52a661457ccf33a64fd7c56fd9d"; - sha256 = "192f69yz1hh2k0b2kcvfvv1jirjcvnbxvjkagmlkkqcg8w32nmlg"; - }; - meta.homepage = "https://github.com/CoatiSoftware/vim-sourcetrail/"; - }; - vim-speeddating = buildVimPluginFrom2Nix { pname = "vim-speeddating"; version = "2021-04-29"; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index cb7a8c114daa..2dd0297e293d 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -969,7 +969,6 @@ https://github.com/honza/vim-snippets/,, https://github.com/jhradilek/vim-snippets/,,vim-docbk-snippets https://github.com/tomlion/vim-solidity/,, https://github.com/christoomey/vim-sort-motion/,, -https://github.com/CoatiSoftware/vim-sourcetrail/,, https://github.com/tpope/vim-speeddating/,, https://github.com/kbenzie/vim-spirv/,, https://github.com/mhinz/vim-startify/,, diff --git a/pkgs/development/tools/sourcetrail/default.nix b/pkgs/development/tools/sourcetrail/default.nix deleted file mode 100644 index 6ba4eecac480..000000000000 --- a/pkgs/development/tools/sourcetrail/default.nix +++ /dev/null @@ -1,275 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, callPackage, writeScript, fetchpatch, cmake -, wrapQtAppsHook, qt5, boost, llvmPackages, gcc, jdk, maven, pythonPackages -, coreutils, which, desktop-file-utils, shared-mime-info, imagemagick, libicns -}: - -let - # TODO: remove when version incompatibility issue with python3Packages.jedi is - # resolved - parso = pythonPackages.callPackage ./parso.nix { }; - jedi = pythonPackages.callPackage ./jedi.nix { inherit parso; }; - - pythonIndexer = - pythonPackages.callPackage ./python.nix { inherit jedi parso; }; - javaIndexer = callPackage ./java.nix { }; - - appPrefixDir = if stdenv.isDarwin then - "$out/Applications/Sourcetrail.app/Contents" - else - "$out/opt/sourcetrail"; - appBinDir = - if stdenv.isDarwin then "${appPrefixDir}/MacOS" else "${appPrefixDir}/bin"; - appResourceDir = if stdenv.isDarwin then - "${appPrefixDir}/Resources" - else - "${appPrefixDir}/share"; - - # Upstream script: - # https://github.com/CoatiSoftware/Sourcetrail/blob/master/script/update_java_indexer.sh - installJavaIndexer = writeScript "update_java_indexer.sh" '' - #!${stdenv.shell} - - cd "$(dirname "$0")/.." - dst="${appResourceDir}/data/java/lib" - - mkdir -p "$dst" - cp "${javaIndexer}/target/java-indexer-1.0.jar" "$dst/java-indexer.jar" - cp -r java_indexer/lib/*.jar "$dst" - ''; - - # Upstream script: - # https://github.com/CoatiSoftware/Sourcetrail/blob/master/script/download_python_indexer.sh - installPythonIndexer = writeScript "download_python_indexer.sh" '' - #!${stdenv.shell} - - mkdir -p ${appResourceDir}/data - ln -s "${pythonIndexer}/bin" "${appResourceDir}/data/python" - ''; -in stdenv.mkDerivation rec { - pname = "sourcetrail"; - # NOTE: skip 2020.4.35 https://github.com/CoatiSoftware/Sourcetrail/pull/1136 - version = "2020.2.43"; - - src = fetchFromGitHub { - owner = "CoatiSoftware"; - repo = "Sourcetrail"; - rev = version; - sha256 = "0jp9y86xzkcxikc1cn4f6gqgg6zdssck08677ldagw25p1zadvzw"; - }; - - patches = let - url = commit: - "https://github.com/CoatiSoftware/Sourcetrail/commit/${commit}.patch"; - in [ - ./disable-updates.patch - ./disable-failing-tests.patch # FIXME: 5 test cases failing due to sandbox - # TODO: remove on next release - (fetchpatch { - name = "fix-filecopy.patch"; - url = url "d079d1787c9e5cadcf41a003666dc0746cc1cda0"; - sha256 = "0mixy2a4s16kv2q89k7y4dv21wnv2zd86i4gdwn3xz977y8hf92b"; - }) - (fetchpatch { - name = "fix-broken-test.patch"; - url = url "85329174bac8a301733100dc4540258f977e2c5a"; - sha256 = "17l4417sbmkrgr6v3fbazlmkzl9774zrpjv2n9zwfrz52y30f7b9"; - }) - ]; - - nativeBuildInputs = [ - cmake - jdk - wrapQtAppsHook - desktop-file-utils - imagemagick - javaIndexer # the resulting jar file is copied by our install script - ] ++ lib.optional (stdenv.isDarwin) libicns - ++ lib.optionals doCheck testBinPath; - buildInputs = [ boost pythonIndexer shared-mime-info ] - ++ (with qt5; [ qtbase qtsvg ]) ++ (with llvmPackages; [ libclang llvm ]); - binPath = [ gcc jdk.jre maven which ]; - testBinPath = binPath ++ [ coreutils ]; - - cmakeFlags = [ - "-DBoost_USE_STATIC_LIBS=OFF" - "-DBUILD_CXX_LANGUAGE_PACKAGE=ON" - "-DBUILD_JAVA_LANGUAGE_PACKAGE=ON" - "-DBUILD_PYTHON_LANGUAGE_PACKAGE=ON" - ] ++ lib.optional stdenv.isLinux - "-DCMAKE_PREFIX_PATH=${llvmPackages.clang-unwrapped}" - ++ lib.optional stdenv.isDarwin - "-DClang_DIR=${llvmPackages.clang-unwrapped}"; - - postPatch = let - major = lib.versions.major version; - minor = lib.versions.minor version; - patch = lib.versions.patch version; - in '' - # Upstream script obtains it's version from git: - # https://github.com/CoatiSoftware/Sourcetrail/blob/master/cmake/version.cmake - cat > cmake/version.cmake < mavenPaths = utility::getMavenExecutablePathDetector()->getPaths(); - - REQUIRE(!mavenPaths.empty()); -diff --git a/src/test/UtilityMavenTestSuite.cpp b/src/test/UtilityMavenTestSuite.cpp -index f48fe2b6..363ef64a 100644 ---- a/src/test/UtilityMavenTestSuite.cpp -+++ b/src/test/UtilityMavenTestSuite.cpp -@@ -17,6 +17,7 @@ TEST_CASE("maven path detector is working") - - TEST_CASE("maven wrapper detects source directories of simple projects") - { -+ return; - std::shared_ptr mavenPathDetector = utility::getMavenExecutablePathDetector(); - REQUIRE(!mavenPathDetector->getPaths().empty()); - -@@ -41,6 +42,7 @@ TEST_CASE("maven wrapper detects source directories of simple projects") - - TEST_CASE("maven wrapper detects source and test directories of simple projects") - { -+ return; - std::shared_ptr mavenPathDetector = utility::getMavenExecutablePathDetector(); - REQUIRE(!mavenPathDetector->getPaths().empty()); - -@@ -65,6 +67,7 @@ TEST_CASE("maven wrapper detects source and test directories of simple projects" - - TEST_CASE("maven wrapper detects source directories of nested modules") - { -+ return; - std::shared_ptr mavenPathDetector = utility::getMavenExecutablePathDetector(); - REQUIRE(!mavenPathDetector->getPaths().empty()); - -@@ -101,6 +104,7 @@ TEST_CASE("maven wrapper detects source directories of nested modules") - - TEST_CASE("maven wrapper detects source and test directories of nested modules") - { -+ return; - std::shared_ptr mavenPathDetector = utility::getMavenExecutablePathDetector(); - REQUIRE(!mavenPathDetector->getPaths().empty()); - diff --git a/pkgs/development/tools/sourcetrail/disable-updates.patch b/pkgs/development/tools/sourcetrail/disable-updates.patch deleted file mode 100644 index 112af857c59e..000000000000 --- a/pkgs/development/tools/sourcetrail/disable-updates.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/lib/settings/ApplicationSettings.cpp b/src/lib/settings/ApplicationSettings.cpp -index 1be13ccd..db6098e1 100644 ---- a/src/lib/settings/ApplicationSettings.cpp -+++ b/src/lib/settings/ApplicationSettings.cpp -@@ -593,7 +593,7 @@ void ApplicationSettings::setUserToken(std::string token) - - bool ApplicationSettings::getAutomaticUpdateCheck() const - { -- return getValue("user/update_check/automatic", true); -+ return false; - } - - void ApplicationSettings::setAutomaticUpdateCheck(bool automaticUpdates) diff --git a/pkgs/development/tools/sourcetrail/java.nix b/pkgs/development/tools/sourcetrail/java.nix deleted file mode 100644 index 7e5bd75f84aa..000000000000 --- a/pkgs/development/tools/sourcetrail/java.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, pkgs, javaPackages }: - -let - javaIndexer = javaPackages.mavenbuild { - name = "sourcetrail-java-indexer-${pkgs.sourcetrail.version}"; - src = pkgs.sourcetrail.src; - m2Path = "com/sourcetrail/java-indexer"; - - # This doesn't include all required dependencies. We still rely on binary - # copies of maven packages included in the source repo for building. - mavenDeps = with javaPackages; [ - mavenCompiler_3_2 - plexusCompilerApi_2_4 - plexusCompilerJavac_2_4 - plexusCompilerManager_2_4 - ]; - - meta = { - description = "Java indexer for Sourcetrail"; - sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; - }; - }; -in -javaIndexer.overrideAttrs (drv: { - postUnpack = '' - export sourceRoot=''${sourceRoot}/java_indexer - ''; -}) diff --git a/pkgs/development/tools/sourcetrail/jedi.nix b/pkgs/development/tools/sourcetrail/jedi.nix deleted file mode 100644 index 93650c9027a4..000000000000 --- a/pkgs/development/tools/sourcetrail/jedi.nix +++ /dev/null @@ -1,36 +0,0 @@ -# Taken from a past commit of nixpkgs - -{ lib, buildPythonPackage, fetchPypi, pytest, glibcLocales, tox, pytest-cov, parso }: - -buildPythonPackage rec { - pname = "jedi"; - - # TODO: Remove this package when version incompatibility issue with - # python3Packages.jedi is resolved. - # - # Upstream requirements: - # https://github.com/CoatiSoftware/SourcetrailPythonIndexer#requirements - version = "0.17.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "86ed7d9b750603e4ba582ea8edc678657fb4007894a12bcf6f4bb97892f31d20"; - }; - - checkInputs = [ pytest glibcLocales tox pytest-cov ]; - - propagatedBuildInputs = [ parso ]; - - checkPhase = '' - LC_ALL="en_US.UTF-8" py.test test - ''; - - # tox required for tests: https://github.com/davidhalter/jedi/issues/808 - doCheck = false; - - meta = with lib; { - homepage = "https://github.com/davidhalter/jedi"; - description = "An autocompletion tool for Python that can be used for text editors"; - license = licenses.lgpl3Plus; - }; -} diff --git a/pkgs/development/tools/sourcetrail/parso.nix b/pkgs/development/tools/sourcetrail/parso.nix deleted file mode 100644 index bd5d5b86ac51..000000000000 --- a/pkgs/development/tools/sourcetrail/parso.nix +++ /dev/null @@ -1,29 +0,0 @@ -# Taken from a past commit of nixpkgs - -{ lib -, buildPythonPackage -, fetchPypi -, pytest -}: - -buildPythonPackage rec { - pname = "parso"; - - # TODO: Remove along with ./jedi.nix when version compatiblity issue is - # resolved. - version = "0.7.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "908e9fae2144a076d72ae4e25539143d40b8e3eafbaeae03c1bfe226f4cdf12c"; - }; - - checkInputs = [ pytest ]; - - meta = { - description = "A Python Parser"; - homepage = "https://github.com/davidhalter/parso"; - license = lib.licenses.mit; - }; - -} diff --git a/pkgs/development/tools/sourcetrail/python.nix b/pkgs/development/tools/sourcetrail/python.nix deleted file mode 100644 index f9ea96463207..000000000000 --- a/pkgs/development/tools/sourcetrail/python.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, wrapPython, python, jedi, parso, cmake, swig }: - -stdenv.mkDerivation rec { - pname = "SourcetrailPythonIndexer"; - version = "v1_db25_p5"; - - src = fetchFromGitHub { - owner = "CoatiSoftware"; - repo = pname; - rev = version; - sha256 = "01jaigxigq6dvfwq018gn9qw7i6p4jm0y71lqzschfv9vwf6ga45"; - fetchSubmodules = true; - }; - - nativeBuildInputs = [ wrapPython cmake swig ]; - buildInputs = [ python ]; - pythonPath = [ jedi parso ]; - - dontUseCmakeConfigure = true; - cmakeFlags = [ - "-DBUILD_BINDINGS_PYTHON=1" - "-DPYTHON_VERSION=${lib.versions.majorMinor python.version}" - ]; - - buildPhase = '' - pushd SourcetrailDB - cmake -Bbuild $cmakeFlags . - pushd build - make -j $NIX_BUILD_CORES - popd - popd - '' + lib.optionalString stdenv.isDarwin '' - pushd SourcetrailDB/build/bindings_python - cp _sourcetraildb.dylib _sourcetraildb.so - popd - ''; - - checkPhase = '' - buildPythonPath "$pythonPath" - - # FIXME: some tests are failing - # PYTHONPATH="$program_PYTHONPATH:SourcetrailDB/build/bindings_python" \ - # ${python}/bin/python test.py - PYTHONPATH="$program_PYTHONPATH:SourcetrailDB/build/bindings_python" \ - ${python}/bin/python test_shallow.py - ''; - - installPhase = '' - shopt -s extglob - mkdir -p $out/{bin,libexec} - - cp !(run).py $out/libexec # copy *.py excluding run.py (needs extglob) - cat <(echo '#!/usr/bin/env python') run.py > $out/libexec/run.py - chmod +x $out/libexec/run.py - ln -s $out/libexec/run.py $out/bin/SourcetrailPythonIndexer - - pushd SourcetrailDB/build/bindings_python - cp sourcetraildb.py $out/libexec - cp _sourcetraildb.so $out/libexec/_sourcetraildb.so - popd - - wrapPythonProgramsIn "$out/libexec" "$pythonPath" - ''; - - doCheck = true; - - meta = with lib; { - description = "Python indexer for Sourcetrail"; - homepage = "https://github.com/CoatiSoftware/SourcetrailPythonIndexer"; - license = licenses.gpl3; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3ea7c71457a6..d69c6d8dcfd6 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1328,6 +1328,8 @@ mapAliases ({ source-han-serif-simplified-chinese = source-han-serif; source-han-serif-traditional-chinese = source-han-serif; + sourcetrail = throw "sourcetrail has been removed: abandoned by upstream"; # Added 2022-08-14 + spaceOrbit = throw "'spaceOrbit' has been renamed to/replaced by 'space-orbit'"; # Converted to throw 2022-02-22 spectral = neochat; # Added 2020-12-27 speech_tools = throw "'speech_tools' has been renamed to/replaced by 'speech-tools'"; # Converted to throw 2022-02-22 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9ff8d0d543c9..cc7d259174c4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30612,16 +30612,6 @@ with pkgs; spotify = callPackage ../applications/audio/spotify/wrapper.nix { }; - sourcetrail = let - llvmPackages = llvmPackages_10; - in libsForQt5.callPackage ../development/tools/sourcetrail { - stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; - jdk = jdk8; - pythonPackages = python3Packages; - inherit llvmPackages; - boost = boost16x; # Filesystem tests in the checkPhase fail with Boost 1.77 - }; - spotifywm = callPackage ../applications/audio/spotifywm { }; psst = callPackage ../applications/audio/psst { };