2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "heatseeker";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rschmitt";
|
|
|
|
repo = "heatseeker";
|
|
|
|
rev = "v${version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-SU5HLAFA7IHnVhsmVtxskteeKKIEvvVSqHIeEk5BkfA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
cargoSha256 = "sha256-RHD2/Uvj8NWpZ+xK16xTN5K/hDWYhwHnu2E5NslGFQI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
# https://github.com/rschmitt/heatseeker/issues/42
|
|
|
|
# I've suggested using `/usr/bin/env stty`, but doing that isn't quite as simple
|
|
|
|
# as a substitution, and this works since we have the path to coreutils stty.
|
|
|
|
patchPhase = ''
|
2020-08-20 17:08:02 +00:00
|
|
|
substituteInPlace src/screen/unix.rs --replace "/bin/stty" "${coreutils}/bin/stty"
|
2020-05-03 17:38:23 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# some tests require a tty, this variable turns them off for Travis CI,
|
|
|
|
# which we can also make use of
|
|
|
|
TRAVIS = "true";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A general-purpose fuzzy selector";
|
|
|
|
homepage = "https://github.com/rschmitt/heatseeker";
|
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "hs";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|