mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 12:04:40 +00:00
trenchbroom: 2021.1 -> 2022.1
This commit is contained in:
parent
04e0c8f5f4
commit
b0a02108e6
@ -1,19 +1,20 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub
|
{ lib, stdenv, fetchFromGitHub
|
||||||
, cmake, ninja, git, pandoc
|
, cmake, ninja, git, pandoc, pkg-config
|
||||||
, libGL, libGLU, libXxf86vm, freeimage
|
, libGL, libGLU, libXxf86vm, freeimage
|
||||||
|
, catch2, fmt, glew, miniz, tinyxml-2, xorg
|
||||||
, qtbase, wrapQtAppsHook
|
, qtbase, wrapQtAppsHook
|
||||||
, copyDesktopItems, makeDesktopItem
|
, copyDesktopItems, makeDesktopItem
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "TrenchBroom";
|
pname = "TrenchBroom";
|
||||||
version = "2021.1";
|
version = "2022.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "TrenchBroom";
|
owner = "TrenchBroom";
|
||||||
repo = "TrenchBroom";
|
repo = "TrenchBroom";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "06j68kp7g57hclyp8ilh2wd4vr5w8r718cicdp1cap48fcxlqfxv";
|
sha256 = "sha256-FNpYBfKnY9foPq1+21+382KKXieHksr3tCox251iJn4=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -21,25 +22,20 @@ stdenv.mkDerivation rec {
|
|||||||
--subst-var-by APP_VERSION_YEAR ${lib.versions.major version} \
|
--subst-var-by APP_VERSION_YEAR ${lib.versions.major version} \
|
||||||
--subst-var-by APP_VERSION_NUMBER ${lib.versions.minor version} \
|
--subst-var-by APP_VERSION_NUMBER ${lib.versions.minor version} \
|
||||||
--subst-var-by GIT_DESCRIBE v${version}
|
--subst-var-by GIT_DESCRIBE v${version}
|
||||||
|
|
||||||
# Tests don't compile because of vendored `catch2` being incompatible with glibc-2.34.
|
|
||||||
# Also, no need to since we don't even run them.
|
|
||||||
substituteInPlace lib/CMakeLists.txt \
|
|
||||||
--replace "add_subdirectory(Catch2)" ""
|
|
||||||
substituteInPlace lib/vecmath/CMakeLists.txt \
|
|
||||||
--replace "add_subdirectory(test)" "" \
|
|
||||||
--replace "add_subdirectory(lib)" ""
|
|
||||||
substituteInPlace lib/kdl/CMakeLists.txt \
|
|
||||||
--replace "add_subdirectory(test)" ""
|
|
||||||
substituteInPlace common/CMakeLists.txt \
|
|
||||||
--replace "add_subdirectory(test)" "" \
|
|
||||||
--replace "add_subdirectory(benchmark)" ""
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake git pandoc wrapQtAppsHook copyDesktopItems ];
|
nativeBuildInputs = [ cmake git pandoc wrapQtAppsHook copyDesktopItems pkg-config ];
|
||||||
buildInputs = [ libGL libGLU libXxf86vm freeimage qtbase ];
|
buildInputs = [
|
||||||
|
libGL libGLU libXxf86vm freeimage qtbase catch2 fmt glew miniz tinyxml-2
|
||||||
|
xorg.libSM
|
||||||
|
];
|
||||||
QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}";
|
QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}";
|
||||||
QT_QPA_PLATFORM = "offscreen";
|
QT_QPA_PLATFORM = "offscreen";
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
# https://github.com/TrenchBroom/TrenchBroom/issues/4002#issuecomment-1125390780
|
||||||
|
"-DCMAKE_PREFIX_PATH=cmake/packages"
|
||||||
|
];
|
||||||
ninjaFlags = [
|
ninjaFlags = [
|
||||||
"TrenchBroom"
|
"TrenchBroom"
|
||||||
];
|
];
|
||||||
@ -71,6 +67,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://trenchbroom.github.io/";
|
homepage = "https://trenchbroom.github.io/";
|
||||||
|
changelog = "https://github.com/TrenchBroom/TrenchBroom/releases/tag/v${version}";
|
||||||
description = "Level editor for Quake-engine based games";
|
description = "Level editor for Quake-engine based games";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
maintainers = with maintainers; [ astro ];
|
maintainers = with maintainers; [ astro ];
|
||||||
|
Loading…
Reference in New Issue
Block a user