fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 coreutils,
3 fetchurl,
4 gnugrep,
5 jre_headless,
6 lib,
7 makeBinaryWrapper,
8 nixosTests,
9 stdenv,
10 stdenvNoCC,
11}:
12
13stdenvNoCC.mkDerivation (finalAttrs: {
14 pname = "opensearch";
15 version = "2.19.2";
16
17 src = fetchurl {
18 url = "https://artifacts.opensearch.org/releases/bundle/opensearch/${finalAttrs.version}/opensearch-${finalAttrs.version}-linux-x64.tar.gz";
19 hash = "sha256-EaOx8vs3y00ln7rUiaCGoD+HhiQY4bhQAzu18VfaTYw=";
20 };
21
22 nativeBuildInputs = [
23 makeBinaryWrapper
24 ];
25
26 buildInputs = [
27 jre_headless
28 ];
29
30 installPhase = ''
31 runHook preInstall
32
33 mkdir -p $out
34 cp -R bin config lib modules plugins $out
35
36 substituteInPlace $out/bin/opensearch \
37 --replace 'bin/opensearch-keystore' "$out/bin/opensearch-keystore"
38
39 wrapProgram $out/bin/opensearch \
40 --prefix PATH : "${
41 lib.makeBinPath [
42 gnugrep
43 coreutils
44 ]
45 }" \
46 --prefix LD_LIBRARY_PATH : "${
47 lib.makeLibraryPath [ stdenv.cc.cc ]
48 }:$out/plugins/opensearch-knn/lib/" \
49 --set JAVA_HOME "${jre_headless}"
50
51 wrapProgram $out/bin/opensearch-plugin --set JAVA_HOME "${jre_headless}"
52
53 rm $out/bin/opensearch-cli
54
55 runHook postInstall
56 '';
57
58 passthru.tests = nixosTests.opensearch;
59
60 meta = {
61 description = "Open Source, Distributed, RESTful Search Engine";
62 homepage = "https://github.com/opensearch-project/OpenSearch";
63 license = lib.licenses.asl20;
64 maintainers = with lib.maintainers; [ shyim ];
65 platforms = lib.platforms.unix;
66 sourceProvenance = with lib.sourceTypes; [
67 binaryBytecode
68 binaryNativeCode
69 ];
70 };
71})