mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 03:25:02 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform, coreutils }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "heatseeker";
|
|
version = "1.7.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rschmitt";
|
|
repo = "heatseeker";
|
|
rev = "v${version}";
|
|
sha256 = "1x7mdyf1m17s55f6yjdr1j510kb7a8f3zkd7lb2kzdc7nd3vgaxg";
|
|
};
|
|
|
|
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";
|
|
|
|
meta = with lib; {
|
|
description = "A general-purpose fuzzy selector";
|
|
homepage = "https://github.com/rschmitt/heatseeker";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.michaelpj ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|