locate: fix creation of the parent directory of of locate database
commitc06a10e05fedcd49c4b2f88a435e9aad64395d0a
authorromildo <malaquias@gmail.com>
dateSun 28 May 2017, 15:21 (10 years ago)
parent90b08c2
nixos/modules/misc/locate.nix+1−1
@@ -131,7 +131,7 @@ in {
131131 path = mkIf (!isMLocate) [ pkgs.su ];
132132 script =
133133 ''
134− install -m ${if isMLocate then "0750" else "0755"} -o root -g ${if isMLocate then "mlocate" else "root"} -d $(dirname ${cfg.output})
134+ mkdir -m 0755 -p ${dirOf cfg.output}
135135 exec ${cfg.locate}/bin/updatedb \
136136 ${optionalString (cfg.localuser != null) ''--localuser=${cfg.localuser}''} \
137137 --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}