nixpkgs/pkgs/tools/misc/plocate/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
992 B
Nix
Raw Normal View History

{ config
, stdenv
, lib
, fetchgit
, pkg-config
, meson
, ninja
, systemd
, liburing
, zstd
}:
let
dbfile = lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
2022-02-14 15:20:50 +00:00
in
stdenv.mkDerivation rec {
pname = "plocate";
2023-06-21 10:46:59 +00:00
version = "1.1.19";
src = fetchgit {
url = "https://git.sesse.net/plocate";
rev = version;
2023-06-21 10:46:59 +00:00
sha256 = "sha256-Vf/NgUPDL3KWMpjnyB2QR2sU6rQfPIADNU6OlpN+O0M=";
};
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"
"-Dsharedstatedir=${builtins.dirOf dbfile}"
"-Ddbpath=${builtins.baseNameOf dbfile}"
];
meta = with lib; {
description = "Much faster locate";
homepage = "https://plocate.sesse.net/";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg SuperSandro2000 ];
platforms = platforms.linux;
};
}