mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 11:02:05 +00:00
locate: build in correct dbpath
This commit is contained in:
parent
cc1ebd1db4
commit
06211e700b
|
@ -113,8 +113,14 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
nixpkgs.config = { locate.dbfile = cfg.output; };
|
||||
|
||||
environment.systemPackages = [ cfg.locate ];
|
||||
|
||||
environment.variables = mkIf (!isMLocate)
|
||||
{ LOCATE_PATH = cfg.output;
|
||||
};
|
||||
|
||||
warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root"
|
||||
++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
|
||||
++ optional (isFindutils && cfg.pruneBindMounts) "findutils locate does not support skipping bind mounts";
|
||||
|
|
|
@ -17,8 +17,7 @@ in
|
|||
config = {
|
||||
|
||||
environment.variables =
|
||||
{ LOCATE_PATH = "/var/cache/locatedb";
|
||||
NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
|
||||
{ NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
|
||||
PAGER = mkDefault "less -R";
|
||||
EDITOR = mkDefault "nano";
|
||||
};
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
dbfile = stdenv.lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "mlocate-${version}";
|
||||
version = "0.26";
|
||||
|
||||
|
@ -10,6 +12,7 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
makeFlags = [ "dbfile=${dbfile}" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Merging locate is an utility to index and quickly search for files";
|
||||
|
|
Loading…
Reference in a new issue