about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTravis Whitton <travis@sharpspring.com>2021-02-18 17:41:13 -0500
committerTravis Whitton <travis@sharpspring.com>2021-02-18 17:41:13 -0500
commitecf73146301c3454214fda071d29b395618f0487 (patch)
treea4ec8c2e6780a841b4ac85a621def135034f0608
parentd73afe9462a9d61006fff9f1aa6b601129a6d1f7 (diff)
uchess: init at 0.2.1
-rw-r--r--pkgs/games/uchess/default.nix32
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/games/uchess/default.nix b/pkgs/games/uchess/default.nix
new file mode 100644
index 0000000000000..bc2524466ccb3
--- /dev/null
+++ b/pkgs/games/uchess/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoModule, fetchFromGitHub, makeWrapper, stockfish }:
+
+buildGoModule rec {
+  pname = "uchess";
+  version = "0.2.1";
+
+  subPackages = [ "cmd/uchess" ];
+
+  src = fetchFromGitHub {
+    owner = "tmountain";
+    repo = "uchess";
+    rev = "v${version}";
+    sha256 = "1njl3f41gshdpj431zkvpv2b7zmh4m2m5q6xsijb0c0058dk46mz";
+  };
+
+  vendorSha256 = "0dkq240ch1z3gihn8yc5d723nnvfxirk2nhw12r1c2hj1ga088g3";
+
+  # package does not contain any tests as of v0.2.1
+  doCheck = false;
+
+  buildInputs = [ makeWrapper ];
+  postInstall = ''
+    wrapProgram $out/bin/uchess --suffix PATH : ${stockfish}/bin
+  '';
+
+  meta = with lib; {
+    description = "Play chess against UCI engines in your terminal.";
+    homepage = "https://tmountain.github.io/uchess/";
+    maintainers = with maintainers; [ tmountain ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c37e6c0985afd..53e1b8e5b51bd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27322,6 +27322,10 @@ in
 
   typespeed = callPackage ../games/typespeed { };
 
+  uchess = callPackage ../games/uchess {
+    buildGoModule = buildGo116Module;
+  };
+
   udig = callPackage ../applications/gis/udig { };
 
   ufoai = callPackage ../games/ufoai { };