2022-01-23 23:36:51 +00:00
|
|
|
{ config
|
|
|
|
, stdenv
|
2021-06-22 06:13:11 +00:00
|
|
|
, lib
|
|
|
|
, fetchgit
|
|
|
|
, pkg-config
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, systemd
|
|
|
|
, liburing
|
|
|
|
, zstd
|
|
|
|
}:
|
2022-01-23 23:36:51 +00:00
|
|
|
let
|
|
|
|
dbfile = lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
|
2022-02-14 15:20:50 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-22 06:13:11 +00:00
|
|
|
pname = "plocate";
|
2023-06-21 10:46:59 +00:00
|
|
|
version = "1.1.19";
|
2021-06-22 06:13:11 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sesse.net/plocate";
|
|
|
|
rev = version;
|
2023-06-21 10:46:59 +00:00
|
|
|
sha256 = "sha256-Vf/NgUPDL3KWMpjnyB2QR2sU6rQfPIADNU6OlpN+O0M=";
|
2021-06-22 06:13:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i meson.build \
|
|
|
|
-e '/mkdir\.sh/d'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ systemd liburing zstd ];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2022-01-22 09:51:21 +00:00
|
|
|
"-Dsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
2022-01-23 23:36:51 +00:00
|
|
|
"-Dsharedstatedir=${builtins.dirOf dbfile}"
|
|
|
|
"-Ddbpath=${builtins.baseNameOf dbfile}"
|
2021-06-22 06:13:11 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Much faster locate";
|
|
|
|
homepage = "https://plocate.sesse.net/";
|
|
|
|
license = licenses.mit;
|
2022-01-23 03:24:41 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg SuperSandro2000 ];
|
2021-06-22 06:13:11 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|