Skip to content

Commit

Permalink
git-gamble: init at 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pinage404 committed Aug 11, 2024
1 parent cff7476 commit e87edc3
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions pkgs/by-name/gi/git-gamble/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
lib,
rustPlatform,
fetchFromGitLab,
git,
installShellFiles,
nix-update-script,
}:

let
version = "2.9.0";

src = fetchFromGitLab {
owner = "pinage404";
repo = "git-gamble";
rev = "version/${version}";
hash = "sha256-hMP5mBKXcO+Ws04G3OxdYuB5JoaSjlYtlkerRQ6+bXw=";
};
in
rustPlatform.buildRustPackage {
pname = "git-gamble";
inherit version src;

cargoHash = "sha256-vrzcNdLY2PkyZ1eLwOiONRHVAolbTDxytEgi09WkDZQ=";

nativeCheckInputs = [ git ];
preCheck = ''
patchShebangs tests/editor/fake_editor.sh
'';

nativeBuildInputs = [ installShellFiles ];
postInstall = ''
export PATH="$PATH:$out/bin/"
sh ./script/generate_completion.sh target/release/shell_completions/
installShellCompletion --cmd git-gamble \
--bash target/release/shell_completions/git-gamble.bash \
--fish target/release/shell_completions/git-gamble.fish \
--zsh target/release/shell_completions/_git-gamble
sh ./script/usage.sh > git-gamble.1
installManPage git-gamble.1
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "Tool that blends TDD (Test Driven Development) + TCR (`test && commit || revert`)";
homepage = "https://git-gamble.is-cool.dev";
changelog = "https://gitlab.com/pinage404/git-gamble/-/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.isc;
sourceProvenance = [ lib.sourceTypes.fromSource ];
maintainers = [ lib.maintainers.pinage404 ];
mainProgram = "git-gamble";
};
}

0 comments on commit e87edc3

Please sign in to comment.