nixpkgs/pkgs/by-name/mc/mcfly/package.nix
2024-08-12 14:01:44 +00:00

31 lines
1.0 KiB
Nix

{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "mcfly";
version = "0.9.2";
src = fetchFromGitHub {
owner = "cantino";
repo = "mcfly";
rev = "v${version}";
hash = "sha256-KQgoyxzTWoQok/sUFcvUazxrBMxVXvxqjJudyKYeZCo=";
};
postPatch = ''
substituteInPlace mcfly.bash --replace '$(command which mcfly)' '${placeholder "out"}/bin/mcfly'
substituteInPlace mcfly.zsh --replace '$(command which mcfly)' '${placeholder "out"}/bin/mcfly'
substituteInPlace mcfly.fish --replace '(command which mcfly)' '${placeholder "out"}/bin/mcfly'
'';
cargoHash = "sha256-c+LOmUUt8t1x5Pp8yGHSeLcJNs/lJzq29KMX/i7Cscs=";
meta = with lib; {
homepage = "https://github.com/cantino/mcfly";
description = "Upgraded ctrl-r where history results make sense for what you're working on right now";
changelog = "https://github.com/cantino/mcfly/raw/v${version}/CHANGELOG.txt";
license = licenses.mit;
maintainers = [ maintainers.melkor333 ];
mainProgram = "mcfly";
};
}