nixpkgs/pkgs/games/openclonk/default.nix

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

47 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, cmake, pkg-config
2018-04-10 09:47:09 +02:00
, SDL2, libvorbis, libogg, libjpeg, libpng, freetype, glew, tinyxml, openal
, freealut, readline, gcc-unwrapped
, enableSoundtrack ? false # Enable the "Open Clonk Soundtrack - Explorers Journey" by David Oerther
2016-08-23 04:49:15 +02:00
}:
let
soundtrack_src = fetchurl {
url = "http://www.openclonk.org/download/Music.ocg";
sha256 = "1ckj0dlpp5zsnkbb5qxxfxpkiq76jj2fgj91fyf3ll7n0gbwcgw5";
};
in stdenv.mkDerivation rec {
2018-04-10 09:47:09 +02:00
version = "8.1";
pname = "openclonk";
2016-08-23 04:49:15 +02:00
src = fetchurl {
url = "https://www.openclonk.org/builds/release/8.1/openclonk-${version}-src.tar.bz2";
2018-04-10 09:47:09 +02:00
sha256 = "0imkqjp8lww5p0cnqf4k4mb2v682mnsas63qmiz17rspakr7fxik";
2016-08-23 04:49:15 +02:00
};
postInstall = ''
mv -v $out/games/openclonk $out/bin/
2021-01-15 05:31:39 +01:00
'' + lib.optionalString enableSoundtrack ''
2018-04-10 09:47:09 +02:00
ln -sv ${soundtrack_src} $out/share/games/openclonk/Music.ocg
2016-08-23 04:49:15 +02:00
'';
nativeBuildInputs = [ cmake pkg-config ];
2018-04-10 09:47:09 +02:00
2016-08-23 04:49:15 +02:00
buildInputs = [
2018-04-10 09:47:09 +02:00
SDL2 libvorbis libogg libjpeg libpng freetype glew tinyxml openal freealut
readline
2016-08-23 04:49:15 +02:00
];
2018-04-10 09:47:09 +02:00
cmakeFlags = [ "-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar" "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib" ];
cmakeBuildType = "RelWithDebInfo";
meta = with lib; {
2016-08-23 04:49:15 +02: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 04:49:15 +02:00
license = if enableSoundtrack then licenses.unfreeRedistributable else licenses.isc;
2018-04-10 09:47:09 +02:00
maintainers = with maintainers; [ lheckemann ];
platforms = [ "x86_64-linux" "i686-linux" ];
broken = true;
2016-08-23 04:49:15 +02:00
};
}