heatseeker: fix finding stty

Otherwise this crashes at runtime.

I've opened https://github.com/rschmitt/heatseeker/issues/42 upstream.
wip/yesman
Michael Peyton Jones 4 years ago
parent ae6bdcc535
commit 4df9436951
No known key found for this signature in database
GPG Key ID: 86A43C24A728F66D
  1. 9
      pkgs/tools/misc/heatseeker/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, rustPlatform }:
{ stdenv, fetchFromGitHub, rustPlatform, coreutils }:
rustPlatform.buildRustPackage rec {
pname = "heatseeker";
@ -13,6 +13,13 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "0jnlcm7v29m4nc318qgf7r7jvs80s7n04fw83imm506vwr9rxbx9";
# 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";

Loading…
Cancel
Save