domino-chain: init at 1.1 (#315862)

This commit is contained in:
Gaétan Lepage
2025-02-13 22:40:09 +01:00
committed by GitHub
2 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/src/domino-chain/tools.cpp b/src/domino-chain/tools.cpp
index 0eaa592..e91c760 100644
--- a/src/domino-chain/tools.cpp
+++ b/src/domino-chain/tools.cpp
@@ -48,6 +48,8 @@
#include <boost/filesystem.hpp>
+#include <algorithm>
+
uint64_t getTime(void)
{
#if defined(WIN32) || defined(_WIN32)

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchFromGitLab,
boost,
freefont_ttf,
fribidi,
gettext,
imagemagick,
libpng,
lua,
pkg-config,
povray,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_ttf,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "domino-chain";
version = "1.1";
src = fetchFromGitLab {
owner = "domino-chain";
repo = "domino-chain.gitlab.io";
tag = finalAttrs.version;
hash = "sha256-ERR5QwQpTFLeAijlGtGU0Lpd40II/L5i3muYDN2EfX4=";
};
patches = [
./algorithm-header.patch
];
postPatch = ''
substituteInPlace Makefile \
--replace-warn /usr/share/fonts/truetype/freefont/ ${freefont_ttf}/share/fonts/truetype/
substituteInPlace src/domino-chain/screen.cpp \
--replace-fail /usr/share/fonts/truetype/freefont/ ${freefont_ttf}/share/fonts/truetype/
'';
nativeBuildInputs = [
gettext
imagemagick
pkg-config
povray
];
buildInputs = [
boost
freefont_ttf
fribidi
libpng
lua
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
zlib
];
enableParallelBuilding = true;
__structuredAttrs = true;
makeFlags = [
"PREFIX=$(out)"
"POVRAY=povray Work_Threads=$(NIX_BUILD_CORES)"
];
env.NIX_CFLAGS_COMPILE = toString [
"-I${lib.getDev SDL2}/include/SDL2"
"-I${lib.getDev SDL2_mixer}/include/SDL2"
];
meta = {
description = "Rearrange dominoes on different platforms to start a chain reaction";
homepage = "https://domino-chain.gitlab.io/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ fgaz ];
mainProgram = "domino-chain";
platforms = lib.platforms.all;
};
})