Skip to content

Instantly share code, notes, and snippets.

@ericsagnes
Created June 3, 2017 07:57
Show Gist options
  • Save ericsagnes/a28aab3c3f9ccdb80f4fe2158689464a to your computer and use it in GitHub Desktop.
Save ericsagnes/a28aab3c3f9ccdb80f4fe2158689464a to your computer and use it in GitHub Desktop.
Solr 6.5.1 nix expression
solr = callPackage ../servers/search/solr { java = jre; };
{ stdenv, fetchurl, lsof, makeWrapper, gawk, procps
, java }:
stdenv.mkDerivation rec {
name = "solr-${version}";
version = "6.5.1";
src = fetchurl {
url = "mirror://apache/lucene/solr/${version}/solr-${version}.tgz";
sha256 = "1lymbf474b2ks5md7hqpvxxb0pdz6dyp396hvnl4gs6mfi27sskw";
};
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out
cp -R * $out
'';
preFixup = ''
wrapProgram $out/bin/solr \
--set JAVA_HOME "${java}" \
--prefix PATH : ${lsof}/bin:${gawk}/bin:${procps}/bin
'';
meta = with stdenv.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 = [ maintainers.rickynils maintainers.domenkozar ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment