nixpkgs/pkgs/by-name/gr/groonga/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

67 lines
1.7 KiB
Nix

{ lib, stdenv, cmake, fetchurl, kytea, msgpack-c, mecab, pkg-config, rapidjson, testers, xxHash, zstd, postgresqlPackages
, suggestSupport ? false, zeromq, libevent, openssl
, lz4Support ? false, lz4
, zlibSupport ? true, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "groonga";
version = "14.0.6";
src = fetchurl {
url = "https://packages.groonga.org/source/groonga/groonga-${finalAttrs.version}.tar.gz";
hash = "sha256-1caTQAycvpG2PgtbxIn58HrxvWjxKgiczRSC72nWzGw=";
};
patches = [
./fix-cmake-install-path.patch
./do-not-use-vendored-libraries.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
rapidjson
xxHash
zstd
mecab
kytea
msgpack-c
] ++ lib.optionals lz4Support [
lz4
] ++ lib.optional zlibSupport [
zlib
] ++ lib.optionals suggestSupport [
zeromq
libevent
];
env.NIX_CFLAGS_COMPILE = lib.optionalString zlibSupport "-I${zlib.dev}/include";
passthru.tests = {
inherit (postgresqlPackages) pgroonga;
version = testers.testVersion {
package = finalAttrs.finalPackage;
};
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "groonga" ];
};
};
meta = with lib; {
homepage = "https://groonga.org/";
description = "Open-source fulltext search engine and column store";
license = licenses.lgpl21;
maintainers = [ maintainers.ericsagnes ];
platforms = platforms.all;
longDescription = ''
Groonga is an open-source fulltext search engine and column store.
It lets you write high-performance applications that requires fulltext search.
'';
};
})