python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / gi / git-gamble / package.nix
blob943c075a00d1a48662f800cf92d6d4d9b4fcd3e4
2   lib,
3   rustPlatform,
4   fetchFromGitLab,
5   gitMinimal,
6   installShellFiles,
7   makeWrapper,
8   nix-update-script,
9 }:
11 let
12   version = "2.9.0";
14   src = fetchFromGitLab {
15     owner = "pinage404";
16     repo = "git-gamble";
17     rev = "version/${version}";
18     hash = "sha256-hMP5mBKXcO+Ws04G3OxdYuB5JoaSjlYtlkerRQ6+bXw=";
19   };
21 rustPlatform.buildRustPackage {
22   pname = "git-gamble";
23   inherit version src;
25   cargoHash = "sha256-vrzcNdLY2PkyZ1eLwOiONRHVAolbTDxytEgi09WkDZQ=";
27   nativeCheckInputs = [ gitMinimal ];
28   preCheck = ''
29     patchShebangs tests/editor/fake_editor.sh
30   '';
32   nativeBuildInputs = [
33     installShellFiles
34     makeWrapper
35   ];
36   postInstall = ''
37     wrapProgram $out/bin/git-gamble \
38       --prefix PATH : "${lib.makeBinPath [ gitMinimal ]}"
40     export PATH="$PATH:$out/bin/"
42     sh ./script/generate_completion.sh target/release/shell_completions/
43     installShellCompletion --cmd git-gamble \
44       --bash target/release/shell_completions/git-gamble.bash \
45       --fish target/release/shell_completions/git-gamble.fish \
46       --zsh target/release/shell_completions/_git-gamble
48     sh ./script/usage.sh > git-gamble.1
49     installManPage git-gamble.1
50   '';
52   passthru.updateScript = nix-update-script { };
54   meta = {
55     description = "Tool that blends TDD (Test Driven Development) + TCR (`test && commit || revert`)";
56     homepage = "https://git-gamble.is-cool.dev";
57     changelog = "https://gitlab.com/pinage404/git-gamble/-/blob/${src.rev}/CHANGELOG.md";
58     license = lib.licenses.isc;
59     sourceProvenance = [ lib.sourceTypes.fromSource ];
60     maintainers = [ lib.maintainers.pinage404 ];
61     mainProgram = "git-gamble";
62   };