summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Peyton Jones <me@michaelpj.com>2020-04-07 21:03:13 +0100
committerMichael Peyton Jones <me@michaelpj.com>2020-04-08 09:53:48 +0100
commit4df94369519a724fdcb55ea2d0a7afc851ca7a82 (patch)
tree6d19aae2aa28b7120b78b17f97487b8fea04e43e
parentae6bdcc53584aaf20211ce1814bea97ece08a248 (diff)
downloadnixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.tar
nixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.tar.gz
nixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.tar.bz2
nixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.tar.lz
nixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.tar.xz
nixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.tar.zst
nixpkgs-4df94369519a724fdcb55ea2d0a7afc851ca7a82.zip
heatseeker: fix finding stty
Otherwise this crashes at runtime.

I've opened https://github.com/rschmitt/heatseeker/issues/42 upstream.
-rw-r--r--pkgs/tools/misc/heatseeker/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/tools/misc/heatseeker/default.nix b/pkgs/tools/misc/heatseeker/default.nix
index 22a7d8ec4a7..e0b8c02a08e 100644
--- a/pkgs/tools/misc/heatseeker/default.nix
+++ b/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";