tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
locate: build in correct dbpath
Gregor Kleen
9 years ago
06211e70
cc1ebd1d
+12
-4
3 changed files
expand all
collapse all
unified
split
nixos
modules
misc
locate.nix
programs
environment.nix
pkgs
tools
misc
mlocate
default.nix
+6
nixos/modules/misc/locate.nix
···
113
113
}
114
114
];
115
115
116
116
+
nixpkgs.config = { locate.dbfile = cfg.output; };
117
117
+
116
118
environment.systemPackages = [ cfg.locate ];
119
119
+
120
120
+
environment.variables = mkIf (!isMLocate)
121
121
+
{ LOCATE_PATH = cfg.output;
122
122
+
};
117
123
118
124
warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root"
119
125
++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
+1
-2
nixos/modules/programs/environment.nix
···
17
17
config = {
18
18
19
19
environment.variables =
20
20
-
{ LOCATE_PATH = "/var/cache/locatedb";
21
21
-
NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
20
20
+
{ NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
22
21
PAGER = mkDefault "less -R";
23
22
EDITOR = mkDefault "nano";
24
23
};
+5
-2
pkgs/tools/misc/mlocate/default.nix
···
1
1
-
{ stdenv, fetchurl }:
1
1
+
{ stdenv, fetchurl, config }:
2
2
3
3
-
stdenv.mkDerivation rec {
3
3
+
let
4
4
+
dbfile = stdenv.lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
5
5
+
in stdenv.mkDerivation rec {
4
6
name = "mlocate-${version}";
5
7
version = "0.26";
6
8
···
10
12
};
11
13
12
14
buildInputs = [ ];
15
15
+
makeFlags = [ "dbfile=${dbfile}" ];
13
16
14
17
meta = with stdenv.lib; {
15
18
description = "Merging locate is an utility to index and quickly search for files";