nixos/meilisearch: use meilisearch_1_11 for stateVersion below 25.05 (#409336)
This commit is contained in:
@@ -129,6 +129,22 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
warnings = lib.optional (lib.versionOlder cfg.package.version "1.12") ''
|
||||
Meilisearch 1.11 will be removed in NixOS 25.11. As it was the last
|
||||
version not to support dumpless upgrades, you will have to manually
|
||||
migrate your data before that. Instructions can be found at
|
||||
https://www.meilisearch.com/docs/learn/update_and_migration/updating#using-a-dump
|
||||
and afterwards, you can set `services.meilisearch.package = pkgs.meilisearch;`
|
||||
to use the latest version.
|
||||
'';
|
||||
|
||||
services.meilisearch.package = lib.mkDefault (
|
||||
if lib.versionAtLeast config.system.stateVersion "25.05" then
|
||||
pkgs.meilisearch
|
||||
else
|
||||
pkgs.meilisearch_1_11
|
||||
);
|
||||
|
||||
# used to restore dumps
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
|
||||
@@ -4,10 +4,24 @@
|
||||
fetchFromGitHub,
|
||||
nixosTests,
|
||||
nix-update-script,
|
||||
version ? "1.14.0",
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.14.0";
|
||||
# Version 1.11 is kept here as it was the last version not to support dumpless
|
||||
# upgrades, meaning NixOS systems that have set up their data before 25.05
|
||||
# would not be able to update to 1.12+ without manual data migration.
|
||||
# We're planning to remove it towards NixOS 25.11. Make sure to update
|
||||
# the meilisearch module accordingly and to remove the meilisearch_1_11
|
||||
# attribute from all-packages.nix at that point too.
|
||||
hashes = {
|
||||
"1.14.0" = "sha256-nPOhiJJbZCr9PBlR6bsZ9trSn/2XCI2O+nXeYbZEQpU=";
|
||||
"1.11.3" = "sha256-CVofke9tOGeDEhRHEt6EYwT52eeAYNqlEd9zPpmXQ2U=";
|
||||
};
|
||||
cargoHashes = {
|
||||
"1.14.0" = "sha256-8fcOXAzheG9xm1v7uD3T+6oc/dD4cjtu3zzBBh2EkcE=";
|
||||
"1.11.3" = "sha256-cEJTokDJQuc9Le5+3ObMDNJmEhWEb+Qh0TV9xZkD9D8=";
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "meilisearch";
|
||||
@@ -17,13 +31,13 @@ rustPlatform.buildRustPackage {
|
||||
owner = "meilisearch";
|
||||
repo = "meiliSearch";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-nPOhiJJbZCr9PBlR6bsZ9trSn/2XCI2O+nXeYbZEQpU=";
|
||||
hash = hashes.${version};
|
||||
};
|
||||
|
||||
cargoBuildFlags = [ "--package=meilisearch" ];
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-8fcOXAzheG9xm1v7uD3T+6oc/dD4cjtu3zzBBh2EkcE=";
|
||||
cargoHash = cargoHashes.${version};
|
||||
|
||||
# Default features include mini dashboard which downloads something from the internet.
|
||||
buildNoDefaultFeatures = true;
|
||||
|
||||
@@ -16280,6 +16280,8 @@ with pkgs;
|
||||
icu = icu71;
|
||||
};
|
||||
|
||||
meilisearch_1_11 = callPackage ../by-name/me/meilisearch/package.nix { version = "1.11.3"; };
|
||||
|
||||
mongocxx = callPackage ../development/libraries/mongocxx/default.nix { };
|
||||
|
||||
muse = libsForQt5.callPackage ../applications/audio/muse { };
|
||||
|
||||
Reference in New Issue
Block a user