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