nixos/locate: rip out dbfile overrides
All the locate versions we have support LOCATE_PATH, so just use that instead of adding indirections all over the place AND forcing people to rebuild their locate implementation if they want the path changed.
This commit is contained in:
@@ -230,9 +230,9 @@ in
|
|||||||
plocate = (mkIf isPLocate (mkMerge [ common plocate ]));
|
plocate = (mkIf isPLocate (mkMerge [ common plocate ]));
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ (cfg.locate.override { dbfile = cfg.output; }) ];
|
environment.systemPackages = [ cfg.locate ];
|
||||||
|
|
||||||
environment.variables = mkIf (!isMorPLocate) { LOCATE_PATH = cfg.output; };
|
environment.variables.LOCATE_PATH = cfg.output;
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
# write /etc/updatedb.conf for manual calls to `updatedb`
|
# write /etc/updatedb.conf for manual calls to `updatedb`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchurl, config, dbfile ? config.locate.dbfile or "/var/cache/locatedb" }:
|
{ lib, stdenv, fetchurl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mlocate";
|
pname = "mlocate";
|
||||||
@@ -9,9 +9,6 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0gi6y52gkakhhlnzy0p6izc36nqhyfx5830qirhvk3qrzrwxyqrh";
|
sha256 = "0gi6y52gkakhhlnzy0p6izc36nqhyfx5830qirhvk3qrzrwxyqrh";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ];
|
|
||||||
makeFlags = [ "dbfile=${dbfile}" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Merging locate is an utility to index and quickly search for files";
|
description = "Merging locate is an utility to index and quickly search for files";
|
||||||
homepage = "https://pagure.io/mlocate";
|
homepage = "https://pagure.io/mlocate";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ config
|
{ stdenv
|
||||||
, stdenv
|
|
||||||
, lib
|
, lib
|
||||||
, fetchgit
|
, fetchgit
|
||||||
, pkg-config
|
, pkg-config
|
||||||
@@ -8,7 +7,6 @@
|
|||||||
, systemd
|
, systemd
|
||||||
, liburing
|
, liburing
|
||||||
, zstd
|
, zstd
|
||||||
, dbfile ? config.locate.dbfile or "/var/cache/locatedb"
|
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "plocate";
|
pname = "plocate";
|
||||||
@@ -31,8 +29,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
"-Dsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
||||||
"-Dsharedstatedir=${builtins.dirOf dbfile}"
|
|
||||||
"-Ddbpath=${builtins.baseNameOf dbfile}"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|||||||
Reference in New Issue
Block a user