2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, allegro }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-11-03 02:18:15 +00:00
|
|
|
version = "5.6.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "liquidwar5";
|
|
|
|
src = fetchurl {
|
2020-11-03 02:18:15 +00:00
|
|
|
url = "http://www.ufoot.org/download/liquidwar/v5/${version}/liquidwar-${version}.tar.gz";
|
|
|
|
sha256 = "2tCqhN1BbK0FVCHtm0DfOe+ueNPfdZwFg8ZMVPfy/18=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ allegro ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
configureFlags = lib.optional stdenv.isx86_64 "--disable-asm";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2022-05-18 14:49:53 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: random.o:(.bss+0x0): multiple definition of `LW_RANDOM_ON'; game.o:(.bss+0x4): first defined here
|
|
|
|
"-fcommon"
|
|
|
|
|
|
|
|
"-lm"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-02-05 17:12:51 +00:00
|
|
|
description = "The classic version of a quick tactics game LiquidWar";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|