2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, coreutils }:
|
2015-11-14 20:32:51 +00:00
|
|
|
|
2020-03-07 20:22:11 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 11:41:23 +00:00
|
|
|
pname = "heatseeker";
|
2022-07-28 14:33:23 +00:00
|
|
|
version = "1.7.2";
|
2015-11-14 20:32:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rschmitt";
|
|
|
|
repo = "heatseeker";
|
|
|
|
rev = "v${version}";
|
2022-07-28 14:33:23 +00:00
|
|
|
sha256 = "sha256-SU5HLAFA7IHnVhsmVtxskteeKKIEvvVSqHIeEk5BkfA=";
|
2015-11-14 20:32:51 +00:00
|
|
|
};
|
2016-04-20 09:40:59 +00:00
|
|
|
|
2022-07-28 14:33:23 +00:00
|
|
|
cargoSha256 = "sha256-RHD2/Uvj8NWpZ+xK16xTN5K/hDWYhwHnu2E5NslGFQI=";
|
2017-03-22 01:17:22 +00:00
|
|
|
|
2020-04-07 20:03:13 +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-07-31 04:08:19 +00:00
|
|
|
substituteInPlace src/screen/unix.rs --replace "/bin/stty" "${coreutils}/bin/stty"
|
2020-04-07 20:03:13 +00:00
|
|
|
'';
|
|
|
|
|
2015-11-14 20:32:51 +00:00
|
|
|
# some tests require a tty, this variable turns them off for Travis CI,
|
|
|
|
# which we can also make use of
|
2017-03-22 01:17:22 +00:00
|
|
|
TRAVIS = "true";
|
2015-11-14 20:32:51 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2024-06-07 07:46:46 +00:00
|
|
|
description = "General-purpose fuzzy selector";
|
2020-03-07 20:22:11 +00:00
|
|
|
homepage = "https://github.com/rschmitt/heatseeker";
|
2017-03-22 01:17:22 +00:00
|
|
|
license = licenses.mit;
|
2024-05-13 09:38:20 +00:00
|
|
|
maintainers = [ ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "hs";
|
2019-02-17 13:00:33 +00:00
|
|
|
platforms = platforms.unix;
|
2015-11-14 20:32:51 +00:00
|
|
|
};
|
|
|
|
}
|