2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, allegro }:
|
2016-08-26 13:40:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2020-11-02 02:58:54 +01:00
|
|
|
version = "5.6.5";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "liquidwar5";
|
2016-08-26 13:40:38 +02:00
|
|
|
src = fetchurl {
|
2020-11-02 02:58:54 +01:00
|
|
|
url = "http://www.ufoot.org/download/liquidwar/v5/${version}/liquidwar-${version}.tar.gz";
|
|
|
|
sha256 = "2tCqhN1BbK0FVCHtm0DfOe+ueNPfdZwFg8ZMVPfy/18=";
|
2016-08-26 13:40:38 +02:00
|
|
|
};
|
|
|
|
|
2016-08-28 16:06:55 +02:00
|
|
|
buildInputs = [ allegro ];
|
2016-08-26 13:40:38 +02:00
|
|
|
|
2021-01-15 05:31:39 +01:00
|
|
|
configureFlags = lib.optional stdenv.isx86_64 "--disable-asm";
|
2016-08-26 13:40:38 +02:00
|
|
|
|
2016-08-28 16:06:55 +02:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2023-02-19 20:23:32 +01:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2022-05-17 12:17:59 +02: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"
|
|
|
|
];
|
2019-09-12 18:28:56 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-01-24 10:19:10 +01:00
|
|
|
description = "The classic version of a quick tactics game LiquidWar";
|
2016-08-28 16:06:55 +02:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2016-08-26 13:40:38 +02:00
|
|
|
}
|