2022-01-25 03:21:06 +00:00
|
|
|
{ config
|
|
|
|
, stdenv
|
2021-06-28 23:13:55 +00:00
|
|
|
, lib
|
|
|
|
, fetchgit
|
|
|
|
, pkg-config
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, systemd
|
|
|
|
, liburing
|
|
|
|
, zstd
|
|
|
|
}:
|
2022-01-25 03:21:06 +00:00
|
|
|
let
|
|
|
|
dbfile = lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
|
2022-02-20 05:27:41 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "plocate";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "1.1.16";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sesse.net/plocate";
|
|
|
|
rev = version;
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-rwvzDr3leve8BQ30+c3l1+q/7+u7FhPQ7iFcvbx/HjM=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i meson.build \
|
|
|
|
-e '/mkdir\.sh/d'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ systemd liburing zstd ];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2022-01-25 03:21:06 +00:00
|
|
|
"-Dsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
"-Dsharedstatedir=${builtins.dirOf dbfile}"
|
|
|
|
"-Ddbpath=${builtins.baseNameOf dbfile}"
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Much faster locate";
|
|
|
|
homepage = "https://plocate.sesse.net/";
|
|
|
|
license = licenses.mit;
|
2022-01-25 03:21:06 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg SuperSandro2000 ];
|
2021-06-28 23:13:55 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|