about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/fishnet/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/fishnet/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/fishnet/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/fishnet/default.nix b/nixpkgs/pkgs/servers/fishnet/default.nix
new file mode 100644
index 000000000000..508068bd2d4b
--- /dev/null
+++ b/nixpkgs/pkgs/servers/fishnet/default.nix
@@ -0,0 +1,37 @@
+{ 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.4";
+
+  src = fetchFromGitHub {
+    owner = "niklasf";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "19dh69b6mqx16195w9d20fah4jl8hhbxm84xq4zwsgl4khmw7zqz";
+  };
+
+  cargoSha256 = "0zl2fnmqncyjd52wkn6dddx9lm9ywpw7swy895yq299z2bbbkv3h";
+
+  preBuild = ''
+    rmdir ./assets
+    ln -snf ${assets}/${assets.relAssetsPath} ./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 ];
+  };
+}