From b84fd70d88f121de536f48c7bc08b3678fe8cabd Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 3 Mar 2018 22:20:27 +0300 Subject: [PATCH] doomseeker: 1.1 -> 2018-03-03 Fixes build because of newer Glibc incompatibility. --- pkgs/applications/misc/doomseeker/default.nix | 23 ++++++----- .../misc/doomseeker/fix_paths.patch | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 pkgs/applications/misc/doomseeker/fix_paths.patch diff --git a/pkgs/applications/misc/doomseeker/default.nix b/pkgs/applications/misc/doomseeker/default.nix index 1393af67bf8..bd7fbe86316 100644 --- a/pkgs/applications/misc/doomseeker/default.nix +++ b/pkgs/applications/misc/doomseeker/default.nix @@ -1,23 +1,24 @@ -{ stdenv, cmake, fetchurl, pkgconfig, qt4, zlib, bzip2 }: +{ stdenv, cmake, fetchFromBitbucket, pkgconfig, qtbase, qttools, qtmultimedia, zlib, bzip2 }: stdenv.mkDerivation rec { - name = "doomseeker-1.1"; + name = "doomseeker-${version}"; + version = "2018-03-03"; - src = fetchurl { - url = "http://doomseeker.drdteam.org/files/${name}_src.tar.bz2"; - sha256 = "0nmq8s842z30ngzikrmfx0xpnk4klxdv37y26chs002rnj010r7h"; + src = fetchFromBitbucket { + owner = "Doomseeker"; + repo = "doomseeker"; + rev = "072110a8fe0643c4a72461e7768560813bb0a62b"; + sha256 = "1w4g5f7yifqk2d054dqrmy8qj4n5hxdan7n59845m1xh2f2r8i0p"; }; - buildInputs = [ qt4 zlib bzip2 ]; + patches = [ ./fix_paths.patch ]; - nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ qtbase qtmultimedia zlib bzip2 ]; + + nativeBuildInputs = [ cmake qttools pkgconfig ]; enableParallelBuilding = true; - patchPhase = '' - substituteInPlace src/core/CMakeLists.txt --replace /usr/share/applications "$out"/share/applications - ''; - meta = with stdenv.lib; { homepage = http://doomseeker.drdteam.org/; description = "Multiplayer server browser for many Doom source ports"; diff --git a/pkgs/applications/misc/doomseeker/fix_paths.patch b/pkgs/applications/misc/doomseeker/fix_paths.patch new file mode 100644 index 00000000000..08654c2384c --- /dev/null +++ b/pkgs/applications/misc/doomseeker/fix_paths.patch @@ -0,0 +1,40 @@ +diff -ru3 source-old/src/core/datapaths.cpp source-new/src/core/datapaths.cpp +--- source-old/src/core/datapaths.cpp 1970-01-01 03:00:01.000000000 +0300 ++++ source-new/src/core/datapaths.cpp 2018-03-04 00:10:25.247262567 +0300 +@@ -335,7 +335,7 @@ + paths.append(workingDirectory()); + paths.append("./"); + #ifndef Q_OS_WIN32 +- paths.append(INSTALL_PREFIX "/" INSTALL_LIBDIR "/doomseeker/"); ++ paths.append(INSTALL_PREFIX "/lib/doomseeker/"); + #endif + paths = uniquePaths(paths); + return Strings::combineManyPaths(paths, "engines/"); +diff -ru3 source-old/src/core/pathfinder/pathfinder.cpp source-new/src/core/pathfinder/pathfinder.cpp +--- source-old/src/core/pathfinder/pathfinder.cpp 1970-01-01 03:00:01.000000000 +0300 ++++ source-new/src/core/pathfinder/pathfinder.cpp 2018-03-04 00:09:34.862556976 +0300 +@@ -128,9 +128,7 @@ + << DataPaths::programFilesDirectory(DataPaths::x64) + << DataPaths::programFilesDirectory(DataPaths::x86); + #else +- paths << "/usr/bin" << "/usr/local/bin" << "/usr/share/bin" +- << "/usr/games/" << "/usr/local/games/" +- << "/usr/share/games/" << gDefaultDataPaths->workingDirectory() << "."; ++ paths << gDefaultDataPaths->workingDirectory() << "."; + #endif + QStringList pathsCopy(paths); + foreach (const QString &path, pathsCopy) +diff -ru3 source-old/src/core/pathfinder/wadpathfinder.cpp source-new/src/core/pathfinder/wadpathfinder.cpp +--- source-old/src/core/pathfinder/wadpathfinder.cpp 1970-01-01 03:00:01.000000000 +0300 ++++ source-new/src/core/pathfinder/wadpathfinder.cpp 2018-03-04 00:09:56.822865339 +0300 +@@ -84,10 +84,6 @@ + QStringList defaultPaths() + { + QStringList paths; +- #ifdef Q_OS_UNIX +- paths << "/usr/local/share/games/doom/" +- << "/usr/share/games/doom/"; +- #endif + return paths; + } + }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f340ad1dd5c..186e75e60dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1955,7 +1955,8 @@ with pkgs; inherit (darwin) cf-private; wxGTK = wxGTK31; }; - doomseeker = callPackage ../applications/misc/doomseeker { }; + + doomseeker = qt5.callPackage ../applications/misc/doomseeker { }; doom-bcc = callPackage ../games/zdoom/bcc-git.nix { };