nixpkgs/pkgs/by-name/gi/gitprompt-rs/package.nix

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

39 lines
786 B
Nix
Raw Normal View History

2024-04-28 18:47:16 +00:00
{
lib,
fetchFromGitHub,
rustPlatform,
git,
}:
2024-05-14 17:44:13 +00:00
let
2023-01-22 18:36:51 +00:00
version = "0.3.0";
2024-05-14 17:44:13 +00:00
in
rustPlatform.buildRustPackage {
pname = "gitprompt-rs";
inherit version;
2023-01-22 18:36:51 +00:00
src = fetchFromGitHub {
owner = "9ary";
2024-05-14 17:44:13 +00:00
repo = "gitprompt-rs";
2023-01-22 18:36:51 +00:00
rev = version;
hash = "sha256-BqI3LbG7I/0wjzJaP8bxRwTM56joLqVaQCmAydX5vQM=";
2023-01-22 18:36:51 +00:00
};
cargoHash = "sha256-KBBdhiXEZz1/w6Zr/LogyceBdCn1ebfkVgGbtcdAeis=";
2023-01-22 18:36:51 +00:00
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
'';
2024-05-14 17:44:13 +00:00
meta = {
2023-01-22 18:36:51 +00:00
description = "Simple Git prompt";
homepage = "https://github.com/9ary/gitprompt-rs";
2024-05-14 17:44:13 +00:00
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
isabelroses
cafkafk
];
2023-11-27 01:17:53 +00:00
mainProgram = "gitprompt-rs";
2023-01-22 18:36:51 +00:00
};
}