nixpkgs/pkgs/games/openclonk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.9 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, fetchFromGitHub, fetchDebianPatch, cmake, pkg-config
2024-05-14 19:13:31 +00:00
, SDL2, libvorbis, libogg, libjpeg, libpng, freetype, glew, tinyxml, openal, libepoxy
, curl
2023-12-11 13:35:38 +00:00
, freealut, readline, libb2, gcc-unwrapped
2018-04-10 07:47:09 +00:00
, enableSoundtrack ? false # Enable the "Open Clonk Soundtrack - Explorers Journey" by David Oerther
2016-08-23 02:49:15 +00:00
}:
let
soundtrack_src = fetchurl {
url = "http://www.openclonk.org/download/Music.ocg";
sha256 = "1ckj0dlpp5zsnkbb5qxxfxpkiq76jj2fgj91fyf3ll7n0gbwcgw5";
};
in stdenv.mkDerivation rec {
2024-05-14 19:13:31 +00:00
version = "unstable-2023-10-30";
pname = "openclonk";
2016-08-23 02:49:15 +00:00
2024-05-14 19:13:31 +00:00
src = fetchFromGitHub {
owner = "openclonk";
repo = "openclonk";
rev = "5275334a11ef7c23ce809f35d6b443abd91b415f";
sha256 = "14x5b2rh739156l4072rbsnv9n862jz1zafi6ng158ja5fwl16l2";
2016-08-23 02:49:15 +00:00
};
2023-12-11 13:35:38 +00:00
patches = [
(fetchDebianPatch {
pname = "openclonk";
version = "8.1";
debianRevision = "3";
patch = "system-libb2.patch";
hash = "sha256-zuH6zxSQXRhnt75092Xwb6XYv8UG391E5Arbnr7ApiI=";
})
];
2024-05-14 19:13:31 +00:00
enableParallelInstalling = false;
2016-08-23 02:49:15 +00:00
postInstall = ''
2021-01-15 04:31:39 +00:00
'' + lib.optionalString enableSoundtrack ''
2018-04-10 07:47:09 +00:00
ln -sv ${soundtrack_src} $out/share/games/openclonk/Music.ocg
2016-08-23 02:49:15 +00:00
'';
nativeBuildInputs = [ cmake pkg-config ];
2018-04-10 07:47:09 +00:00
2016-08-23 02:49:15 +00:00
buildInputs = [
2018-04-10 07:47:09 +00:00
SDL2 libvorbis libogg libjpeg libpng freetype glew tinyxml openal freealut
2024-05-14 19:13:31 +00:00
libepoxy curl
2023-12-11 13:35:38 +00:00
readline libb2
2016-08-23 02:49:15 +00:00
];
2018-04-10 07:47:09 +00:00
cmakeFlags = [ "-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar" "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib" ];
cmakeBuildType = "RelWithDebInfo";
meta = with lib; {
2016-08-23 02:49:15 +00:00
description = "Free multiplayer action game in which you control clonks, small but witty and nimble humanoid beings";
homepage = "https://www.openclonk.org";
2016-08-23 02:49:15 +00:00
license = if enableSoundtrack then licenses.unfreeRedistributable else licenses.isc;
2023-12-11 13:35:38 +00:00
mainProgram = "openclonk";
2018-04-10 07:47:09 +00:00
maintainers = with maintainers; [ lheckemann ];
platforms = [ "x86_64-linux" "i686-linux" ];
2016-08-23 02:49:15 +00:00
};
}