Skip to content

Commit

Permalink
gambit-chess: init at 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
figsoda authored and AndersonTorres committed Jul 22, 2023
1 parent 9e9ef95 commit f18b8ec
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
54 changes: 54 additions & 0 deletions pkgs/games/gambit/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, gambit-chess
}:

buildGoModule rec {
pname = "gambit";
version = "0.1.0";

src = fetchFromGitHub {
owner = "maaslalani";
repo = "gambit";
rev = "v${version}";
hash = "sha256-RLbD9JK1yJn30WWg7KWDjJoj4WXIoy3Kb8t2F8rFPuk=";
};

vendorHash = "sha256-d9fPlv+ZAzQA42I61B5JEzfYpfJc9vWBcLYTX/s5dhs=";

nativeBuildInputs = [
installShellFiles
];

ldflags = [
"-s"
"-w"
"-X=main.Version=v${version}"
"-X=main.CommitSHA=${src.rev}"
];

postInstall = ''
installShellCompletion --cmd gambit \
--bash <($out/bin/gambit completion bash) \
--fish <($out/bin/gambit completion fish) \
--zsh <($out/bin/gambit completion zsh)
'';

passthru.tests = {
version = testers.testVersion {
package = gambit-chess;
version = "v${version}";
};
};

meta = with lib; {
description = "Play chess in your terminal";
homepage = "https://github.com/maaslalani/gambit";
changelog = "https://github.com/maaslalani/gambit/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37237,6 +37237,8 @@ with pkgs;

gambatte = callPackage ../games/gambatte { };

gambit-chess = callPackage ../games/gambit { };

garden-of-coloured-lights = callPackage ../games/garden-of-coloured-lights { allegro = allegro4; };

gargoyle = callPackage ../games/gargoyle {
Expand Down

0 comments on commit f18b8ec

Please sign in to comment.