diff options
author | figsoda <figsoda@pm.me> | 2023-07-21 11:27:56 -0400 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-22 13:59:45 -0300 |
commit | f18b8ec8c6924dc8395b0d865420f5dfe5d9fd9e (patch) | |
tree | ae366ee7c959a014a6fd429eb37af1c43dedc9f1 | |
parent | 9e9ef9531f8961e251781d76939f02eacafb9790 (diff) |
gambit-chess: init at 0.1.0
https://github.com/maaslalani/gambit
-rw-r--r-- | pkgs/games/gambit/default.nix | 54 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/games/gambit/default.nix b/pkgs/games/gambit/default.nix new file mode 100644 index 0000000000000..4bcd329171cc8 --- /dev/null +++ b/pkgs/games/gambit/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f860430deb987..951b7b41e4df0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { |