2020-06-28 19:52:53 +01:00
|
|
|
{ stdenv, rustPlatform, fetchFromGitHub }:
|
2018-12-26 19:49:24 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "mcfly";
|
2020-08-22 10:20:00 +01:00
|
|
|
version = "0.5.0";
|
2018-12-26 19:49:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cantino";
|
|
|
|
repo = "mcfly";
|
2020-01-16 19:33:13 +00:00
|
|
|
rev = "v${version}";
|
2020-08-22 10:20:00 +01:00
|
|
|
sha256 = "155x745jakfcpr6kmp24cy8xwdhv81jdfjjhd149bnw5ilg0z037";
|
2018-12-26 19:49:24 +00:00
|
|
|
};
|
|
|
|
|
2020-08-22 10:20:00 +01: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-01-22 04:00:00 +00:00
|
|
|
install -Dm644 -t $out/share/mcfly mcfly.bash
|
2020-06-28 19:52:53 +01:00
|
|
|
install -Dm644 -t $out/share/mcfly mcfly.zsh
|
2020-08-22 10:20:00 +01:00
|
|
|
install -Dm644 -t $out/share/mcfly mcfly.fish
|
2018-12-26 19:49:24 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-22 10:20:00 +01:00
|
|
|
cargoSha256 = "0y6sjbzg5qqqip9sc9ajyd5ra3n2wwvarj6nhpzjhh05kqz3qja4";
|
2018-12-26 19:49:24 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/cantino/mcfly";
|
2020-06-28 19:52:53 +01:00
|
|
|
description = "An upgraded ctrl-r for Bash whose history results make sense for what you're working on right now";
|
2018-12-26 19:49:24 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.melkor333 ];
|
|
|
|
};
|
|
|
|
}
|