hedgewars: 1.0.0 -> 1.0.2

This commit is contained in:
Nguyễn Gia Phong 2022-09-13 06:25:06 +09:00
parent c97e777ff0
commit 0db05edd09
No known key found for this signature in database
GPG Key ID: 27148B2C06A2224B
2 changed files with 3 additions and 40 deletions

View File

@ -7,20 +7,18 @@
}: }:
let let
# gameServer/hedgewars-server.cabal depends on network < 3
ghc = ghcWithPackages (pkgs: with pkgs; [ ghc = ghcWithPackages (pkgs: with pkgs; [
SHA bytestring entropy hslogger network_2_6_3_1 pkgs.zlib random SHA bytestring entropy hslogger network pkgs.zlib random
regex-tdfa sandi utf8-string vector regex-tdfa sandi utf8-string vector
]); ]);
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hedgewars"; pname = "hedgewars";
version = "1.0.0"; version = "1.0.2";
src = fetchurl { src = fetchurl {
url = "https://www.hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2"; url = "https://www.hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2";
sha256 = "0nqm9w02m0xkndlsj6ys3wr0ik8zc14zgilq7k6fwjrf3zk385i1"; sha256 = "sha256-IB/l5FvYyls9gbGOwGvWu8n6fCxjvwGQBeL4C+W88hI=";
}; };
nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ]; nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
@ -33,33 +31,11 @@ stdenv.mkDerivation rec {
qtbase qtbase
] ++ lib.optional withServer ghc; ] ++ lib.optional withServer ghc;
patches = [
./qt515.patch
];
postPatch = ''
substituteInPlace gameServer/CMakeLists.txt \
--replace mask evaluate
# compile with fpc >= 3.2.0
# https://github.com/archlinux/svntogit-community/blob/75a1b3900fb3dd553d5114bbc8474d85fd6abb02/trunk/PKGBUILD#L26
sed -i 's/procedure ShiftWorld(Dir: LongInt); inline;/procedure ShiftWorld(Dir: LongInt);/' hedgewars/uWorld.pas
'';
cmakeFlags = [ cmakeFlags = [
"-DNOVERSIONINFOUPDATE=ON" "-DNOVERSIONINFOUPDATE=ON"
"-DNOSERVER=${if withServer then "OFF" else "ON"}" "-DNOSERVER=${if withServer then "OFF" else "ON"}"
]; ];
# hslogger brings network-3 and network-bsd which conflict with
# network-2.6.3.1
preConfigure = ''
substituteInPlace gameServer/CMakeLists.txt \
--replace "haskell_flags}" \
"haskell_flags} -package network-2.6.3.1 -hide-package network-bsd"
'';
NIX_LDFLAGS = lib.concatMapStringsSep " " (e: "-rpath ${e}/lib") [ NIX_LDFLAGS = lib.concatMapStringsSep " " (e: "-rpath ${e}/lib") [
SDL2.out SDL2.out
SDL2_image SDL2_image
@ -107,8 +83,5 @@ stdenv.mkDerivation rec {
all movement on the battlefield has ceased).''; all movement on the battlefield has ceased).'';
maintainers = with maintainers; [ kragniz fpletz ]; maintainers = with maintainers; [ kragniz fpletz ];
inherit (fpc.meta) platforms; inherit (fpc.meta) platforms;
# https://github.com/NixOS/nixpkgs/pull/185755#issuecomment-1219024584
broken = true;
hydraPlatforms = platforms.none;
}; };
} }

View File

@ -1,10 +0,0 @@
--- a/QTfrontend/ui/page/pagegamestats.cpp
+++ b/QTfrontend/ui/page/pagegamestats.cpp
@@ -22,6 +22,7 @@
#include <QGraphicsScene>
#include <QGroupBox>
#include <QSizePolicy>
+#include <QPainterPath>
#include "pagegamestats.h"
#include "team.h"