Files
nixpkgs/pkgs/by-name/dr/dreamchess/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

83 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
bison,
flex,
gettext,
makeWrapper,
SDL2,
SDL2_image,
SDL2_mixer,
expat,
glew,
freetype,
libSM,
libXext,
libGL,
libGLU,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dreamchess";
version = "0.3.0";
src = fetchFromGitHub {
owner = "dreamchess";
repo = "dreamchess";
rev = "${finalAttrs.version}";
hash = "sha256-qus/RjwdAl9SuDXfLVKTPImqrvPF3xSDVlbXYLM3JNE=";
};
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
expat
glew
freetype
libSM
libXext
libGL
libGLU
xorg.libxcb
xorg.libX11
];
nativeBuildInputs = [
cmake
bison
flex
gettext
makeWrapper
];
cmakeFlags = [
(lib.cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
(lib.cmakeFeature "OpenGL_GL_PREFERENCE" "GLVND")
(lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share")
];
# This makes sure the default engine (dreamer) will be called from
# the /nix/store/ as well when starting a new game
postFixup = ''
wrapProgram $out/bin/dreamchess \
--prefix PATH : $out/bin
'';
doInstallCheck = true;
postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
stat "''${!outputBin}/bin/dreamer"
'';
meta = {
homepage = "https://github.com/dreamchess/dreamchess";
description = "OpenGL Chess Game";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ spk ];
platforms = lib.platforms.linux;
mainProgram = "dreamchess";
};
})