diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 17ea04cb4ecb..bed50b81604d 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -338,7 +338,7 @@ in lidarr = 306; slurm = 307; kapacitor = 308; - solr = 309; + # solr = 309; removed 2023-03-16 alerta = 310; minetest = 311; rss2email = 312; @@ -648,7 +648,7 @@ in lidarr = 306; slurm = 307; kapacitor = 308; - solr = 309; + # solr = 309; removed 2023-03-16 alerta = 310; minetest = 311; rss2email = 312; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 43d30eb34c57..f5daa37bf3cc 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1062,7 +1062,6 @@ ./services/search/meilisearch.nix ./services/search/opensearch.nix ./services/search/qdrant.nix - ./services/search/solr.nix ./services/security/aesmd.nix ./services/security/certmgr.nix ./services/security/cfssl.nix diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix deleted file mode 100644 index 05592e9fa247..000000000000 --- a/nixos/modules/services/search/solr.nix +++ /dev/null @@ -1,110 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.services.solr; - -in - -{ - options = { - services.solr = { - enable = mkEnableOption (lib.mdDoc "Solr"); - - package = mkOption { - type = types.package; - default = pkgs.solr; - defaultText = literalExpression "pkgs.solr"; - description = lib.mdDoc "Which Solr package to use."; - }; - - port = mkOption { - type = types.port; - default = 8983; - description = lib.mdDoc "Port on which Solr is ran."; - }; - - stateDir = mkOption { - type = types.path; - default = "/var/lib/solr"; - description = lib.mdDoc "The solr home directory containing config, data, and logging files."; - }; - - extraJavaOptions = mkOption { - type = types.listOf types.str; - default = []; - description = lib.mdDoc "Extra command line options given to the java process running Solr."; - }; - - user = mkOption { - type = types.str; - default = "solr"; - description = lib.mdDoc "User under which Solr is ran."; - }; - - group = mkOption { - type = types.str; - default = "solr"; - description = lib.mdDoc "Group under which Solr is ran."; - }; - }; - }; - - config = mkIf cfg.enable { - - environment.systemPackages = [ cfg.package ]; - - systemd.services.solr = { - after = [ "network.target" "remote-fs.target" "nss-lookup.target" "systemd-journald-dev-log.socket" ]; - wantedBy = [ "multi-user.target" ]; - - environment = { - SOLR_HOME = "${cfg.stateDir}/data"; - LOG4J_PROPS = "${cfg.stateDir}/log4j2.xml"; - SOLR_LOGS_DIR = "${cfg.stateDir}/logs"; - SOLR_PORT = "${toString cfg.port}"; - }; - path = with pkgs; [ - gawk - procps - ]; - preStart = '' - mkdir -p "${cfg.stateDir}/data"; - mkdir -p "${cfg.stateDir}/logs"; - - if ! test -e "${cfg.stateDir}/data/solr.xml"; then - install -D -m0640 ${cfg.package}/server/solr/solr.xml "${cfg.stateDir}/data/solr.xml" - install -D -m0640 ${cfg.package}/server/solr/zoo.cfg "${cfg.stateDir}/data/zoo.cfg" - fi - - if ! test -e "${cfg.stateDir}/log4j2.xml"; then - install -D -m0640 ${cfg.package}/server/resources/log4j2.xml "${cfg.stateDir}/log4j2.xml" - fi - ''; - - serviceConfig = { - User = cfg.user; - Group = cfg.group; - ExecStart="${cfg.package}/bin/solr start -f -a \"${concatStringsSep " " cfg.extraJavaOptions}\""; - ExecStop="${cfg.package}/bin/solr stop"; - }; - }; - - users.users = optionalAttrs (cfg.user == "solr") { - solr = { - group = cfg.group; - home = cfg.stateDir; - createHome = true; - uid = config.ids.uids.solr; - }; - }; - - users.groups = optionalAttrs (cfg.group == "solr") { - solr.gid = config.ids.gids.solr; - }; - - }; - -} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 97be13f3bed0..8386219f73d8 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -624,7 +624,6 @@ in { soapui = handleTest ./soapui.nix {}; sogo = handleTest ./sogo.nix {}; solanum = handleTest ./solanum.nix {}; - solr = handleTest ./solr.nix {}; sonarr = handleTest ./sonarr.nix {}; sourcehut = handleTest ./sourcehut.nix {}; spacecookie = handleTest ./spacecookie.nix {}; diff --git a/nixos/tests/solr.nix b/nixos/tests/solr.nix deleted file mode 100644 index 33afe9d788f7..000000000000 --- a/nixos/tests/solr.nix +++ /dev/null @@ -1,56 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ... }: - -{ - name = "solr"; - meta.maintainers = [ pkgs.lib.maintainers.aanderse ]; - - nodes.machine = - { config, pkgs, ... }: - { - # Ensure the virtual machine has enough memory for Solr to avoid the following error: - # - # OpenJDK 64-Bit Server VM warning: - # INFO: os::commit_memory(0x00000000e8000000, 402653184, 0) - # failed; error='Cannot allocate memory' (errno=12) - # - # There is insufficient memory for the Java Runtime Environment to continue. - # Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory. - virtualisation.memorySize = 2000; - - services.solr.enable = true; - }; - - testScript = '' - start_all() - - machine.wait_for_unit("solr.service") - machine.wait_for_open_port(8983) - machine.succeed("curl --fail http://localhost:8983/solr/") - - # adapted from pkgs.solr/examples/films/README.txt - machine.succeed("sudo -u solr solr create -c films") - assert '"status":0' in machine.succeed( - """ - curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{ - "add-field" : { - "name":"name", - "type":"text_general", - "multiValued":false, - "stored":true - }, - "add-field" : { - "name":"initial_release_date", - "type":"pdate", - "stored":true - } - }' - """ - ) - machine.succeed( - "sudo -u solr post -c films ${pkgs.solr}/example/films/films.json" - ) - assert '"name":"Batman Begins"' in machine.succeed( - "curl http://localhost:8983/solr/films/query?q=name:batman" - ) - ''; -}) diff --git a/pkgs/servers/search/solr/default.nix b/pkgs/servers/search/solr/default.nix deleted file mode 100644 index a3b75134107b..000000000000 --- a/pkgs/servers/search/solr/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib, stdenv, fetchurl, jre, makeWrapper, nixosTests }: - -stdenv.mkDerivation rec { - pname = "solr"; - version = "8.6.3"; - - src = fetchurl { - url = "mirror://apache/lucene/${pname}/${version}/${pname}-${version}.tgz"; - sha256 = "0mbbmamajamxzcvdlrzx9wmv26kg9nhg9bzazk176dhhx3rjajf2"; - }; - - nativeBuildInputs = [ makeWrapper ]; - - installPhase = '' - mkdir -p $out $out/bin - - cp -r bin/solr bin/post $out/bin/ - cp -r contrib $out/ - cp -r dist $out/ - cp -r example $out/ - cp -r server $out/ - - wrapProgram $out/bin/solr --set JAVA_HOME "${jre}" - wrapProgram $out/bin/post --set JAVA_HOME "${jre}" - ''; - - passthru.tests = { - inherit (nixosTests) solr; - }; - - meta = with lib; { - homepage = "https://lucene.apache.org/solr/"; - description = "Open source enterprise search platform from the Apache Lucene project"; - license = licenses.asl20; - platforms = platforms.all; - maintainers = with maintainers; [ ]; - knownVulnerabilities = [ - "Multiple security issues throughout 2021, see https://solr.apache.org/security.html" - "Package is outdated and has no maintainer" - ]; - }; - -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 2e5c198b99d1..9598310264d5 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1439,7 +1439,8 @@ mapAliases ({ smugline = throw "smugline has been removed from nixpkgs, as it's unmaintained and depends on deprecated libraries"; # Added 2020-11-04 snack = throw "snack has been removed: broken for 5+ years"; # Added 2022-04-21 soldat-unstable = opensoldat; # Added 2022-07-02 - solr_8 = solr; # Added 2021-01-30 + solr_8 = throw "'solr' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-03-16 + solr = throw "'solr' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-03-16 # Added 2020-02-10 sourceHanSansPackages = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 510341ddab9c..d3f8f97381de 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12277,8 +12277,6 @@ with pkgs; sonar-scanner-cli = callPackage ../tools/security/sonar-scanner-cli { }; - solr = callPackage ../servers/search/solr { }; - solvespace = callPackage ../applications/graphics/solvespace { }; sonarr = callPackage ../servers/sonarr { };