mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
mlocate: init at version 0.26
This commit is contained in:
parent
6d70dd2760
commit
1c8cb703a6
3 changed files with 33 additions and 1 deletions
|
@ -15,6 +15,15 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
locate = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.findutils;
|
||||||
|
example = "pkgs.mlocate";
|
||||||
|
description = ''
|
||||||
|
The locate implementation to use
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
interval = mkOption {
|
interval = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "02:15";
|
default = "02:15";
|
||||||
|
@ -77,7 +86,7 @@ in {
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
mkdir -m 0755 -p $(dirname ${toString cfg.output})
|
mkdir -m 0755 -p $(dirname ${toString cfg.output})
|
||||||
exec updatedb \
|
exec ${cfg.locate}/bin/updatedb \
|
||||||
--localuser=${cfg.localuser} \
|
--localuser=${cfg.localuser} \
|
||||||
${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \
|
${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \
|
||||||
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
||||||
|
|
21
pkgs/tools/misc/mlocate/default.nix
Normal file
21
pkgs/tools/misc/mlocate/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "mlocate-${version}";
|
||||||
|
version = "0.26";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://fedorahosted.org/releases/m/l/mlocate/${name}.tar.xz";
|
||||||
|
sha256 = "0gi6y52gkakhhlnzy0p6izc36nqhyfx5830qirhvk3qrzrwxyqrh";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Merging locate is an utility to index and quickly search for files";
|
||||||
|
homepage = https://fedorahosted.org/mlocate/;
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -13881,6 +13881,8 @@ in
|
||||||
|
|
||||||
diffpdf = callPackage ../applications/misc/diffpdf { };
|
diffpdf = callPackage ../applications/misc/diffpdf { };
|
||||||
|
|
||||||
|
mlocate = callPackage ../tools/misc/mlocate { };
|
||||||
|
|
||||||
mypaint = callPackage ../applications/graphics/mypaint { };
|
mypaint = callPackage ../applications/graphics/mypaint { };
|
||||||
|
|
||||||
mythtv = callPackage ../applications/video/mythtv { };
|
mythtv = callPackage ../applications/video/mythtv { };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue