2024-02-16 17:01:57 +03:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libcap, acl, oniguruma, liburing }:
|
2018-02-11 18:16:46 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "bfs";
|
2024-03-07 06:42:32 +03:00
|
|
|
version = "3.1.3";
|
2018-02-11 18:16:46 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "bfs";
|
|
|
|
owner = "tavianator";
|
|
|
|
rev = version;
|
2024-03-07 06:42:32 +03:00
|
|
|
hash = "sha256-/thPPueNrYzbxxZYAqlxZ2GEsceCzd+LkI84S8AS1mo=";
|
2018-02-11 18:16:46 +03:00
|
|
|
};
|
|
|
|
|
2024-02-16 17:01:57 +03:00
|
|
|
buildInputs = [ oniguruma ] ++ lib.optionals stdenv.isLinux [ libcap acl liburing ];
|
2018-02-11 18:16:46 +03:00
|
|
|
|
2019-04-30 13:52:36 +03:00
|
|
|
# Disable LTO on darwin. See https://github.com/NixOS/nixpkgs/issues/19098
|
2021-01-15 12:19:50 +03:00
|
|
|
preConfigure = lib.optionalString stdenv.isDarwin ''
|
2023-11-15 19:20:29 +03:00
|
|
|
substituteInPlace GNUMakefile --replace "-flto=auto" ""
|
2019-04-30 13:52:36 +03:00
|
|
|
'';
|
|
|
|
|
2018-02-11 18:16:46 +03:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
buildFlags = [ "release" ]; # "release" enables compiler optimizations
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2018-02-11 18:16:46 +03:00
|
|
|
description = "A breadth-first version of the UNIX find command";
|
|
|
|
longDescription = ''
|
|
|
|
bfs is a variant of the UNIX find command that operates breadth-first rather than
|
|
|
|
depth-first. It is otherwise intended to be compatible with many versions of find.
|
|
|
|
'';
|
2020-02-26 00:19:16 +03:00
|
|
|
homepage = "https://github.com/tavianator/bfs";
|
2018-02-11 18:16:46 +03:00
|
|
|
license = licenses.bsd0;
|
2019-01-04 06:36:49 +03:00
|
|
|
platforms = platforms.unix;
|
2023-10-13 07:24:06 +03:00
|
|
|
maintainers = with maintainers; [ yesbox cafkafk ];
|
|
|
|
mainProgram = "bfs";
|
2018-02-11 18:16:46 +03:00
|
|
|
};
|
|
|
|
}
|