diff --git a/pkgs/by-name/ln/lnx/package.nix b/pkgs/by-name/ln/lnx/package.nix index 3bad721f2788..8a99971810b9 100644 --- a/pkgs/by-name/ln/lnx/package.nix +++ b/pkgs/by-name/ln/lnx/package.nix @@ -1,25 +1,26 @@ { lib, + stdenv, rustPlatform, fetchFromGitHub, }: -# unstable was chosen because of an added Cargo.lock -# revert to stable for the version after 0.9.0 -let - version = "unstable-2022-06-25"; -in -rustPlatform.buildRustPackage { +rustPlatform.buildRustPackage (finalAttrs: { pname = "lnx"; - inherit version; + version = "0.9.0-master"; + src = fetchFromGitHub { owner = "lnx-search"; repo = "lnx"; - rev = "2cb80f344c558bfe37f21ccfb83265bf351419d9"; - sha256 = "sha256-iwoZ6xRzEDArmhWYxIrbIXRTQjOizyTsXCvMdnUrs2g="; + tag = finalAttrs.version; + hash = "sha256-J2WP+/f6g1UsjpAdCvkdSpiAyDn9dyAXEbqNfWbNbHk="; }; cargoHash = "sha256-9fro1Dx7P+P9NTsg0gtMfr0s4TEpkZA31EFAnObiNFo="; + + # mimalloc uses ATOMIC_VAR_INIT which was removed in C23 (GCC 15 default) + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c17"; + meta = { description = "Ultra-fast, adaptable deployment of the tantivy search engine via REST"; mainProgram = "lnx"; @@ -28,4 +29,4 @@ rustPlatform.buildRustPackage { maintainers = with lib.maintainers; [ happysalada ]; platforms = lib.platforms.unix; }; -} +})