Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 lowdown-unsandboxed,
6 nix-update-script,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "fastchess";
11 version = "1.4.0-alpha";
12
13 src = fetchFromGitHub {
14 owner = "Disservin";
15 repo = "fastchess";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-fzNpanfeXk7eKftzcs5MIaDBvzumaMQIhhQ8IDFjwPQ=";
18 };
19
20 nativeBuildInputs = [
21 lowdown-unsandboxed
22 ];
23
24 postPatch = ''
25 substituteInPlace app/Makefile \
26 --replace "-march=native" ""
27 '';
28
29 makeFlags = [
30 "PREFIX=${placeholder "out"}"
31 "CXX=${stdenv.cc.targetPrefix}c++"
32 ];
33
34 passthru = {
35 updateScript = nix-update-script { };
36 };
37
38 meta = {
39 description = "Versatile command-line tool designed for running chess engine tournaments";
40 homepage = "https://github.com/Disservin/fastchess";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ Zirconium419122 ];
43 platforms = with lib.platforms; unix ++ windows;
44 mainProgram = "fastchess";
45 };
46})