mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
domino-chain: init at 1.1
This commit is contained in:
13
pkgs/by-name/do/domino-chain/algorithm-header.patch
Normal file
13
pkgs/by-name/do/domino-chain/algorithm-header.patch
Normal 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)
|
||||
84
pkgs/by-name/do/domino-chain/package.nix
Normal file
84
pkgs/by-name/do/domino-chain/package.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user