depot/third_party/nixpkgs/pkgs/applications/version-management/gitprompt-rs/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

32 lines
751 B
Nix

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