2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
git,
|
|
|
|
}:
|
2023-02-02 18:25:31 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "gitprompt-rs";
|
|
|
|
version = "0.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "9ary";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-BqI3LbG7I/0wjzJaP8bxRwTM56joLqVaQCmAydX5vQM=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-KBBdhiXEZz1/w6Zr/LogyceBdCn1ebfkVgGbtcdAeis=";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
substituteInPlace src/main.rs \
|
|
|
|
--replace 'Command::new("git")' 'Command::new("${git}/bin/git")'
|
2023-02-02 18:25:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple Git prompt";
|
|
|
|
homepage = "https://github.com/9ary/gitprompt-rs";
|
|
|
|
license = with licenses; [ mpl20 ];
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ isabelroses cafkafk ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "gitprompt-rs";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
}
|