2021-02-05 17:12:51 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mcfly";
|
2021-04-08 16:26:57 +00:00
|
|
|
version = "0.5.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cantino";
|
|
|
|
repo = "mcfly";
|
|
|
|
rev = "v${version}";
|
2021-04-08 16:26:57 +00:00
|
|
|
sha256 = "sha256-x2cED+WEc50RB8BxiDEm/XnauT1RqqGjSIdL5MMaFBY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace mcfly.bash --replace '$(which mcfly)' $out/bin/mcfly
|
|
|
|
substituteInPlace mcfly.zsh --replace '$(which mcfly)' $out/bin/mcfly
|
|
|
|
substituteInPlace mcfly.fish --replace '(which mcfly)' $out/bin/mcfly
|
2020-04-24 23:36:52 +00:00
|
|
|
install -Dm644 -t $out/share/mcfly mcfly.bash
|
2020-07-18 16:06:22 +00:00
|
|
|
install -Dm644 -t $out/share/mcfly mcfly.zsh
|
2020-09-25 04:45:31 +00:00
|
|
|
install -Dm644 -t $out/share/mcfly mcfly.fish
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
cargoSha256 = "sha256-JCV1cj+RncY/myVJTJ5fNkVqTITqGusA71tv7zGG9Uw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/cantino/mcfly";
|
2020-07-18 16:06:22 +00:00
|
|
|
description = "An upgraded ctrl-r for Bash whose history results make sense for what you're working on right now";
|
2020-12-25 13:55:36 +00:00
|
|
|
changelog = "https://github.com/cantino/mcfly/blob/v${version}/CHANGELOG.txt";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.melkor333 ];
|
|
|
|
};
|
|
|
|
}
|