summary refs log tree commit diff
path: root/pkgs/servers/fishnet/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/fishnet/default.nix')
-rw-r--r--pkgs/servers/fishnet/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/servers/fishnet/default.nix b/pkgs/servers/fishnet/default.nix
new file mode 100644
index 00000000000..be503567c56
--- /dev/null
+++ b/pkgs/servers/fishnet/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitHub
+, xz
+, autoPatchelfHook }:
+
+let
+  assets = import ./assets.nix {
+    inherit lib stdenv fetchFromGitHub xz autoPatchelfHook;
+  };
+in
+rustPlatform.buildRustPackage rec {
+  pname = "fishnet";
+  version = "2.2.6";
+
+  src = fetchFromGitHub {
+    owner = "niklasf";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0dmc58wzv758b82pjpfzcfi0hr14hqcr61cd9v5xlgk5w78cisjq";
+  };
+
+  cargoSha256 = "1s37b0w1aav6gz399zncfp0zqh5sfy0zmabhl7n8p5cwlmlvnlsj";
+
+  preBuild = ''
+    rmdir ./assets
+    ln -snf ${assets}/${assets.relAssetsPath} ./assets
+  '';
+
+  passthru.assets = assets;
+
+  meta = with lib; {
+    description = "Distributed Stockfish analysis for lichess.org";
+    homepage = "https://github.com/niklasf/fishnet";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ tu-maurice ];
+    platforms = [ "x86_64-linux" ];
+  };
+}