nixpkgs/pkgs/by-name/he/heatseeker/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

36 lines
1.1 KiB
Nix

{ lib, fetchFromGitHub, rustPlatform, coreutils }:
rustPlatform.buildRustPackage rec {
pname = "heatseeker";
version = "1.7.2";
src = fetchFromGitHub {
owner = "rschmitt";
repo = "heatseeker";
rev = "v${version}";
sha256 = "sha256-SU5HLAFA7IHnVhsmVtxskteeKKIEvvVSqHIeEk5BkfA=";
};
cargoHash = "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;
};
}