nixpkgs/pkgs/tools/misc/heatseeker/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, rustPlatform, coreutils }:
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";
src = fetchFromGitHub {
owner = "rschmitt";
repo = "heatseeker";
rev = "v${version}";
2022-07-28 14:33:23 +00:00
sha256 = "sha256-SU5HLAFA7IHnVhsmVtxskteeKKIEvvVSqHIeEk5BkfA=";
};
2016-04-20 09:40:59 +00:00
2022-07-28 14:33:23 +00:00
cargoSha256 = "sha256-RHD2/Uvj8NWpZ+xK16xTN5K/hDWYhwHnu2E5NslGFQI=";
# 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 = ''
substituteInPlace src/screen/unix.rs --replace "/bin/stty" "${coreutils}/bin/stty"
'';
# some tests require a tty, this variable turns them off for Travis CI,
# which we can also make use of
TRAVIS = "true";
meta = with lib; {
description = "General-purpose fuzzy selector";
homepage = "https://github.com/rschmitt/heatseeker";
license = licenses.mit;
maintainers = [ ];
mainProgram = "hs";
platforms = platforms.unix;
};
}