mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
findutils: move {locate,updatedb} to a separate $locate output
https://github.com/NixOS/nixpkgs/issues/53925
This commit is contained in:
parent
77dc421883
commit
c3c0444949
2 changed files with 18 additions and 3 deletions
|
@ -27,7 +27,7 @@ in
|
||||||
|
|
||||||
locate = mkOption {
|
locate = mkOption {
|
||||||
type = package;
|
type = package;
|
||||||
default = pkgs.findutils;
|
default = pkgs.findutils.locate;
|
||||||
defaultText = literalExpression "pkgs.findutils";
|
defaultText = literalExpression "pkgs.findutils";
|
||||||
example = literalExpression "pkgs.mlocate";
|
example = literalExpression "pkgs.mlocate";
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
&& (stdenv.hostPlatform.libc != "musl")
|
&& (stdenv.hostPlatform.libc != "musl")
|
||||||
&& stdenv.hostPlatform == stdenv.buildPlatform;
|
&& stdenv.hostPlatform == stdenv.buildPlatform;
|
||||||
|
|
||||||
outputs = [ "out" "info" ];
|
outputs = [ "out" "info" "locate"];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
# "sort" need not be on the PATH as a run-time dep, so we need to tell
|
# "sort" need not be on the PATH as a run-time dep, so we need to tell
|
||||||
|
@ -46,6 +46,18 @@ stdenv.mkDerivation rec {
|
||||||
"-D__nonnull\\(params\\)="
|
"-D__nonnull\\(params\\)="
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
moveToOutput bin/locate $locate
|
||||||
|
moveToOutput bin/updatedb $locate
|
||||||
|
'';
|
||||||
|
|
||||||
|
# can't move man pages in postInstall because the multi-output hook will move them back to $out
|
||||||
|
postFixup = ''
|
||||||
|
moveToOutput share/man/man5 $locate
|
||||||
|
moveToOutput share/man/man1/locate.1.gz $locate
|
||||||
|
moveToOutput share/man/man1/updatedb.1.gz $locate
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -62,9 +74,12 @@ stdenv.mkDerivation rec {
|
||||||
The tools supplied with this package are:
|
The tools supplied with this package are:
|
||||||
|
|
||||||
* find - search for files in a directory hierarchy;
|
* find - search for files in a directory hierarchy;
|
||||||
|
* xargs - build and execute command lines from standard input.
|
||||||
|
|
||||||
|
The following are available in the locate output:
|
||||||
|
|
||||||
* locate - list files in databases that match a pattern;
|
* locate - list files in databases that match a pattern;
|
||||||
* updatedb - update a file name database;
|
* updatedb - update a file name database;
|
||||||
* xargs - build and execute command lines from standard input.
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue