···113 }
114 ];
11500116 environment.systemPackages = [ cfg.locate ];
0000117118 warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root"
119 ++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
···113 }
114 ];
115116+ nixpkgs.config = { locate.dbfile = cfg.output; };
117+118 environment.systemPackages = [ cfg.locate ];
119+120+ environment.variables = mkIf (!isMLocate)
121+ { LOCATE_PATH = cfg.output;
122+ };
123124 warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root"
125 ++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
···1-{ stdenv, fetchurl }:
23-stdenv.mkDerivation rec {
004 name = "mlocate-${version}";
5 version = "0.26";
6···10 };
1112 buildInputs = [ ];
01314 meta = with stdenv.lib; {
15 description = "Merging locate is an utility to index and quickly search for files";
···1+{ stdenv, fetchurl, config }:
23+let
4+ dbfile = stdenv.lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
5+in stdenv.mkDerivation rec {
6 name = "mlocate-${version}";
7 version = "0.26";
8···12 };
1314 buildInputs = [ ];
15+ makeFlags = [ "dbfile=${dbfile}" ];
1617 meta = with stdenv.lib; {
18 description = "Merging locate is an utility to index and quickly search for files";