mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-11 15:08:52 +03:00
en-croissant: init at 0.11.1
This commit is contained in:
parent
b6050e7349
commit
1bb6b1cabe
7020
pkgs/by-name/en/en-croissant/Cargo.lock
generated
Normal file
7020
pkgs/by-name/en/en-croissant/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
121
pkgs/by-name/en/en-croissant/package.nix
Normal file
121
pkgs/by-name/en/en-croissant/package.nix
Normal file
@ -0,0 +1,121 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
overrideSDK,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
|
||||
pnpm_9,
|
||||
nodejs,
|
||||
cargo-tauri,
|
||||
pkg-config,
|
||||
wrapGAppsHook3,
|
||||
makeBinaryWrapper,
|
||||
|
||||
openssl,
|
||||
libsoup,
|
||||
webkitgtk,
|
||||
gst_all_1,
|
||||
darwin,
|
||||
}:
|
||||
|
||||
let
|
||||
buildRustPackage = rustPlatform.buildRustPackage.override {
|
||||
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
||||
};
|
||||
in
|
||||
buildRustPackage rec {
|
||||
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;
|
||||
hash = "sha256-hjSioKpvrGyo5UKvBrwln0S3aIpnJZ2PUdzBfbT7IC4=";
|
||||
};
|
||||
|
||||
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
|
||||
cargo-tauri
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [ wrapGAppsHook3 ]
|
||||
++ lib.optionals stdenv.isDarwin [ makeBinaryWrapper ];
|
||||
|
||||
buildInputs =
|
||||
lib.optionals stdenv.isLinux [
|
||||
openssl
|
||||
libsoup
|
||||
webkitgtk
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-good
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk_11_0.frameworks.Cocoa
|
||||
darwin.apple_sdk_11_0.frameworks.WebKit
|
||||
];
|
||||
|
||||
# remove once cargo-tauri.hook becomes available
|
||||
# https://github.com/NixOS/nixpkgs/pull/335751
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
cargo tauri build --bundles ${if stdenv.isDarwin then "app" else "deb"}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
doCheck = false; # many scoring tests fail
|
||||
|
||||
# remove once cargo-tauri.hook becomes available
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
${lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p "$out"/Applications
|
||||
cp -r src-tauri/target/release/bundle/macos/* "$out"/Applications
|
||||
''}
|
||||
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p "$out"
|
||||
cp -r src-tauri/target/release/bundle/deb/*/data/usr/* "$out"
|
||||
''}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString stdenv.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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user