From 6a60fc3bddf43fb33d50462e511cfdbc0c57f000 Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Fri, 21 Mar 2014 12:02:35 +0100 Subject: [PATCH] solr module: Activate JSP support in Winstone Required by older versions of solr. The JSP support in Winstone seems spotty, but at one point we'll switch over to Jetty instead. --- nixos/modules/services/search/solr.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix index eab18c4229b7..a79b1194c80e 100644 --- a/nixos/modules/services/search/solr.nix +++ b/nixos/modules/services/search/solr.nix @@ -6,6 +6,26 @@ let cfg = config.services.solr; + # Assemble all jars needed for solr + solrJars = pkgs.stdenv.mkDerivation { + name = "solr-jars"; + + src = pkgs.fetchurl { + url = http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.36/bin/apache-tomcat-5.5.36.tar.gz; + sha256 = "01mzvh53wrs1p2ym765jwd00gl6kn8f9k3nhdrnhdqr8dhimfb2p"; + }; + + buildPhases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out/lib + cp common/lib/*.jar $out/lib/ + ln -s ${pkgs.ant}/lib/ant/lib/ant.jar $out/lib/ + ln -s ${cfg.solrPackage}/lib/ext/* $out/lib/ + ln -s ${pkgs.openjdk}/lib/openjdk/lib/tools.jar $out/lib/ + ''; + }; + in { options = { @@ -101,7 +121,8 @@ in { inherit (cfg) user group javaPackage; warFile = "${cfg.solrPackage}/lib/solr.war"; extraOptions = [ - "--commonLibFolder=${cfg.solrPackage}/lib/ext" + "--commonLibFolder=${solrJars}/lib" + "--useJasper" ] ++ cfg.extraWinstoneOptions; extraJavaOptions = [ "-Dsolr.solr.home=${cfg.solrHome}"