meilisearch: add wrapper derivation for renaming
This commit is contained in:
parent
c9f0c6f115
commit
0f1a3661f1
|
@ -10,4 +10,4 @@
|
|||
"meilisearch-tokenizer 0.2.5 (git+https://github.com/meilisearch/tokenizer.git?tag=v0.2.5#c0b5cf741ed9485147f2cbe523f2214d4fa4c395)": "0hvf92z24adqwhh81r9arirhrvgyp1wva9g2wsrir4xqvaqdzdr5",
|
||||
"milli 0.10.2 (git+https://github.com/meilisearch/milli.git?tag=v0.10.2#879d5e8799836d93f8995810965b6797be4f69d1)": "09gdf4mwrn3ka1iqh3h33b86p68c8ichkkkd4231igl11wxj91d1",
|
||||
"pest 2.1.3 (git+https://github.com/pest-parser/pest.git?rev=51fd1d49f1041f7839975664ef71fe15c7dcaf67#51fd1d49f1041f7839975664ef71fe15c7dcaf67)": "1l2ixz723f58ksdm0j12z9zw5cnap0fhcd5kbhbz5ndazy8sn5rf"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,251 +1,48 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, buildRustCrate
|
||||
, defaultCrateOverrides
|
||||
, fetchFromGitHub
|
||||
, Security
|
||||
, libiconv
|
||||
, pkg-config
|
||||
, zlib
|
||||
, features ? [ ]
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.21.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "meilisearch";
|
||||
repo = "MeiliSearch";
|
||||
rev = "v0.21.1";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-wyyhTNhVw8EJhahstLK+QuEhufQC68rMpw/ngK8FL8Y=";
|
||||
};
|
||||
custom = pkgs: buildRustCrate.override {
|
||||
customBuildRustCrateForPkgs = pkgs: buildRustCrate.override {
|
||||
defaultCrateOverrides = defaultCrateOverrides // {
|
||||
meilisearch-http = attrs: {
|
||||
src = "${src}/meilisearch-http";
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||
};
|
||||
meilisearch-error = attrs: {
|
||||
src = "${src}/meilisearch-error";
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
bitflags = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
const_fn = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
encoding_rs = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
futures-core = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
futures-task = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
httparse = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
indexmap = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
libc = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
log = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
memchr = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
paste = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
futures-util = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
proc-macro-hack = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
serde = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
tokio = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
typenum = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
proc-macro2 = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
generic-array = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
ahash = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
standback = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
syn = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
anyhow = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
crc32fast = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
crossbeam-utils = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
futures-channel = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
fst = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
getrandom = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
hashbrown = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
memoffset = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
miniz_oxide = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
crossbeam-epoch = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
num-traits = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
num-integer = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
proc-macro-error-attr = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
proc-macro-nested = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
rayon-core = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
rayon = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
brotli-sys = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
lmdb-rkv-sys = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
libz-sys = attrs: {
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
extraLinkFlags = [ "-L${zlib.out}/lib" ];
|
||||
};
|
||||
rustversion = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
ryu = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
snap = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
ring = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
jieba-rs = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
logging_timer_proc_macros = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
zstd-sys = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
zstd-safe = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
async-trait = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
actix-macros = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
actix-web-codegen = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
concat-arrays = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
async-stream-impl = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
enum-iterator-derive = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
futures-macro = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
proc-macro-error = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
pest_derive = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
serde_derive = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
getset = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
pin-project-internal = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
structopt-derive = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
derive_more = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
thiserror-impl = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
time-macros-impl = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
tokio-macros = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
time = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
zerocopy-derive = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
cookie = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
serde_json = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
vergen = attrs: {
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
};
|
||||
};
|
||||
cargo_nix = import ./Cargo.nix {
|
||||
buildRustCrateForPkgs = custom;
|
||||
nixpkgs = ../../../..;
|
||||
buildRustCrateForPkgs = customBuildRustCrateForPkgs;
|
||||
};
|
||||
meilisearch-http = cargo_nix.workspaceMembers."meilisearch-http".build.override {
|
||||
inherit features;
|
||||
};
|
||||
in
|
||||
cargo_nix.workspaceMembers."meilisearch-http".build.override {
|
||||
inherit features;
|
||||
stdenv.mkDerivation {
|
||||
pname = "meilisearch";
|
||||
inherit version src;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${meilisearch-http}/bin/meilisearch $out/bin/meilisearch
|
||||
'';
|
||||
dontCheck = true;
|
||||
dontFixup = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue