Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 36 lines 940 B view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 allegro, 6}: 7stdenv.mkDerivation rec { 8 version = "5.6.5"; 9 pname = "liquidwar5"; 10 src = fetchurl { 11 url = "http://www.ufoot.org/download/liquidwar/v5/${version}/liquidwar-${version}.tar.gz"; 12 sha256 = "2tCqhN1BbK0FVCHtm0DfOe+ueNPfdZwFg8ZMVPfy/18="; 13 }; 14 15 buildInputs = [ allegro ]; 16 17 configureFlags = lib.optional stdenv.hostPlatform.isx86_64 "--disable-asm"; 18 19 hardeningDisable = [ "format" ]; 20 21 env.NIX_CFLAGS_COMPILE = toString [ 22 # Workaround build failure on -fno-common toolchains like upstream 23 # gcc-10. Otherwise build fails as: 24 # ld: random.o:(.bss+0x0): multiple definition of `LW_RANDOM_ON'; game.o:(.bss+0x4): first defined here 25 "-fcommon" 26 27 "-lm" 28 ]; 29 30 meta = with lib; { 31 description = "Classic version of a quick tactics game LiquidWar"; 32 maintainers = [ maintainers.raskin ]; 33 license = licenses.gpl2Plus; 34 platforms = platforms.linux; 35 }; 36}