2024-09-12 18:49:23 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
pnpm_9,
|
|
|
|
nodejs,
|
|
|
|
cargo-tauri,
|
|
|
|
pkg-config,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
makeBinaryWrapper,
|
|
|
|
|
|
|
|
openssl,
|
|
|
|
libsoup,
|
2024-10-05 01:00:54 +00:00
|
|
|
webkitgtk_4_0,
|
2024-09-12 18:49:23 +00:00
|
|
|
gst_all_1,
|
2024-10-31 19:13:14 +00:00
|
|
|
apple-sdk_11,
|
2024-09-12 18:49:23 +00:00
|
|
|
}:
|
|
|
|
|
2024-10-31 19:13:14 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2024-09-12 18:49:23 +00:00
|
|
|
pname = "en-croissant";
|
|
|
|
version = "0.11.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "franciscoBSalgueiro";
|
|
|
|
repo = "en-croissant";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-EiGML3oFCJR4TZkd+FekUrJwCYe/nGdWD9mAtKKtITQ=";
|
|
|
|
};
|
|
|
|
|
|
|
|
pnpmDeps = pnpm_9.fetchDeps {
|
|
|
|
inherit pname version src;
|
2024-10-18 22:31:36 +00:00
|
|
|
hash = "sha256-hvWXSegUWJvwCU5NLb2vqnl+FIWpCLxw96s9NUIgJTI=";
|
2024-09-12 18:49:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"tauri-plugin-log-0.0.0" = "sha256-t+zmMMSnD9ASZZvqlhu1ah2OjCUtRXdk/xaI37uI49c=";
|
|
|
|
"vampirc-uci-0.11.1" = "sha256-g2JjHZoAmmZ7xsw4YnkUPRXJxsYmBqflWxCFkFEvMXQ=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoRoot = "src-tauri";
|
|
|
|
|
|
|
|
buildAndTestSubdir = cargoRoot;
|
|
|
|
|
|
|
|
nativeBuildInputs =
|
|
|
|
[
|
|
|
|
pnpm_9.configHook
|
|
|
|
nodejs
|
2024-09-27 01:10:11 +00:00
|
|
|
cargo-tauri.hook
|
2024-09-12 18:49:23 +00:00
|
|
|
pkg-config
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ makeBinaryWrapper ];
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
openssl
|
|
|
|
libsoup
|
2024-10-05 01:00:54 +00:00
|
|
|
webkitgtk_4_0
|
2024-09-12 18:49:23 +00:00
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-bad
|
|
|
|
gst_all_1.gst-plugins-good
|
|
|
|
]
|
2024-10-31 19:13:14 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
|
2024-09-12 18:49:23 +00:00
|
|
|
|
|
|
|
doCheck = false; # many scoring tests fail
|
|
|
|
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
makeWrapper "$out"/Applications/en-croissant.app/Contents/MacOS/en-croissant $out/bin/en-croissant
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Ultimate Chess Toolkit";
|
|
|
|
homepage = "https://github.com/franciscoBSalgueiro/en-croissant/";
|
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
mainProgram = "en-croissant";
|
|
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|