nixpkgs/pkgs/applications/version-management/gitprompt-rs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
757 B
Nix
Raw Normal View History

2024-04-28 18:47:16 +00:00
{
lib,
fetchFromGitHub,
rustPlatform,
git,
}:
2023-01-22 18:36:51 +00:00
rustPlatform.buildRustPackage rec {
pname = "gitprompt-rs";
version = "0.3.0";
src = fetchFromGitHub {
owner = "9ary";
repo = pname;
rev = version;
sha256 = "00xxz7awk01981daabp8m3kwq127y733ynijiwqgs8xvn4nkg8h6";
};
cargoSha256 = "0avs833vb6q1avjbfygm55s83iy942xgqsx6qdzksry44n35s418";
postPatch = ''
2024-04-28 18:47:16 +00:00
substituteInPlace src/main.rs \
--replace 'Command::new("git")' 'Command::new("${git}/bin/git")'
2023-01-22 18:36:51 +00:00
'';
meta = with lib; {
description = "Simple Git prompt";
homepage = "https://github.com/9ary/gitprompt-rs";
license = with licenses; [ mpl20 ];
maintainers = with maintainers; [ isabelroses cafkafk ];
2023-11-27 01:17:53 +00:00
mainProgram = "gitprompt-rs";
2023-01-22 18:36:51 +00:00
};
}