aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/maretf
diff options
context:
space:
mode:
authoryuuko <yuuko@partyvan.io>2026-05-16 21:57:24 -0700
committeryuuko <yuuko@partyvan.io>2026-05-16 21:57:24 -0700
commit1448b9e397a188e5880954dcf29f88c5ea941c60 (patch)
treed8d9390d742e2e086fd28310e69e3bd18aa6a773 /srcds-pkgs/maretf
parente7e0ce7d474a1dca211e9f8d3d631d9cb29592fb (diff)
MareTF: 0.7.3 -> 0.11.0HEADmaster
Diffstat (limited to 'srcds-pkgs/maretf')
-rw-r--r--srcds-pkgs/maretf/default.nix208
-rw-r--r--srcds-pkgs/maretf/fix-miniz-cmake-dirs.patch28
2 files changed, 165 insertions, 71 deletions
diff --git a/srcds-pkgs/maretf/default.nix b/srcds-pkgs/maretf/default.nix
index 4eb09b1..10c00fd 100644
--- a/srcds-pkgs/maretf/default.nix
+++ b/srcds-pkgs/maretf/default.nix
@@ -1,84 +1,206 @@
{ lib, stdenv, fetchFromGitHub, fetchgit
, cmake, pkg-config, makeWrapper
, qt6
-, bzip2, xz, zstd, zlib-ng
, openssl, cryptopp
+, python3
}:
stdenv.mkDerivation (self: {
pname = "maretf";
- version = "0.7.3";
+ version = "0.11.0";
src = fetchFromGitHub {
owner = "craftablescience";
repo = self.pname;
tag = "v${self.version}";
fetchSubmodules = true;
- hash = "sha256-kh4Md8RfaCK1HVY7PtfehFRZWoBwUkgwG8eTEgwrZ7E=";
- };
-
- cryptopp-src = fetchgit {
- url = "https://github.com/weidai11/cryptopp";
- tag = "CRYPTOPP_8_9_0";
- hash = "sha256-HV+afSFkiXdy840JbHBTR8lLL0GMwsN3QdwaoQmicpQ=";
- };
-
- zlib-src = fetchgit {
- url = "https://github.com/zlib-ng/zlib-ng";
- tag = "2.2.5";
- hash = "sha256-VB4aegnZCZut9H/Hu2PBwwldpbM7E67D5QFYCKgq3mg=";
- };
-
- bzip2-src = fetchgit {
- url = "https://gitlab.com/bzip2/bzip2";
- rev = "66c46b8c9436613fd81bc5d03f63a61933a4dcc3";
- hash = "sha256-JuwmLBwtUPW9Wt31wIX5NMCu0VTxt16XaBQ2c5rFTY4=";
- };
-
- xz-src = fetchgit {
- url = "https://github.com/tukaani-project/xz";
- tag = "v5.8.1";
- hash = "sha256-29w1K3zC58oFkBvSdwpKu694S+42FxzqOtWBpS7iJ+A=";
- };
-
- zstd-src = fetchgit {
- url = "https://github.com/facebook/zstd";
- tag = "v1.5.7";
- hash = "sha256-tNFWIT9ydfozB8dWcmTMuZLCQmQudTFJIkSr0aG7S44=";
+ hash = "sha256-gHMJIPaphi8AYNiNlGv0P8wH6RUpUM2SAD4O2/4YLVM=";
};
nativeBuildInputs = [
cmake
makeWrapper
qt6.wrapQtAppsHook
+ python3
];
buildInputs = [
- bzip2
+ # WHY DOES IT NEED IT TWICE!!! IT ALREADY FETCHCONTENTS IT!!
cryptopp
openssl
pkg-config
qt6.qtbase
qt6.qttools
- xz
- zlib-ng
- zstd
];
- patches = [ ./fix-miniz-cmake-dirs.patch ];
+ webp-src = fetchFromGitHub {
+ owner = "webmproject";
+ repo = "libwebp";
+ rev = "5003e5609eedc5680b8d838a962cbb9a6e9709ce";
+ hash = "sha256-kSH0q+YuhlCosX1szGLpwqPlBMiJ7sjNA1xuEbfZ1OQ=";
+ };
+
cmakeFlags = with self; [
- (lib.cmakeFeature "CRYPTOPP_SOURCES" "${cryptopp-src}")
- (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_ZLIB" "${zlib-src}")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_BCDEC" "${
+ fetchFromGitHub {
+ owner = "craftablescience";
+ repo = "bcdec";
+ rev = "59441e17ba36b7d7eef336aeedc62e01d0cdcd5a";
+ hash = "sha256-eWzRSto52URWc9WEESxN/hP995qcozjPvmGEBhheFTY=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_BUFFERSTREAM" "${
+ fetchFromGitHub {
+ owner = "craftablescience";
+ repo = "bufferstream";
+ rev = "5c040a17417a3cef650f49c41192b2c00ac1e865";
+ hash = "sha256-1UwU2FqgHCxZTOlmuL4lAZ2qFWgnZGO+gPyeI6D+bTY=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_CMP_COMPRESSONATOR" "${
+ fetchFromGitHub {
+ owner = "craftablescience";
+ repo = "compressonator";
+ rev = "f9c8c58fe753108c260b33ec32301805c33c08b7";
+ hash = "sha256-MjTzKSOCmWweZ9RgBo1qB4K2UEEVlKjLlCG2aH/uMM4=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_TSL_HAT_TRIE" "${
+ fetchFromGitHub {
+ owner = "Tessil";
+ repo = "hat-trie";
+ rev = "f1380d704eccf753db5f9df175789fff8ff353e0";
+ hash = "sha256-5L3qSlwYc2G60GPFrEz06eAWdUcdBQTVBLLOf1sLP0c=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_LIBTOMMATH" "${
+ fetchFromGitHub {
+ owner = "craftablescience";
+ repo = "libtommath";
+ rev = "03101d4556acd45175d5cfe0575601cf6acadef2";
+ hash = "sha256-guQOxzyqxDS1U7Zlsds4QjxIxbBgdnW2IQh9ylmOk5w=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_LIBTOMCRYPT" "${
+ fetchFromGitHub {
+ owner = "libtom";
+ repo = "libtomcrypt";
+ rev = "c80285ba04f87ee5359baf689ccc7ce8a31116dc";
+ hash = "sha256-aSfatMDSD4nq/yxc2lzTC/NVfBANNy0B3YZJ79aBuG4=";
+ }
+ }")
+ # yes, fucking really.
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_LIBWEBP" "${webp-src}")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_WEBP" "${webp-src}")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_MINIZ" "${
+ fetchFromGitHub {
+ owner = "richgel999";
+ repo = "miniz";
+ rev = "5cf1e56a9c968c11fdd1a6414f3a95f84314c437";
+ hash = "sha256-6uaGVr2Eri7VPftkiSX2mdpvviSknXN02YmJnH2okKM=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_MINIZIP-NG" "/build/minizip-ngtmp")
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_BZIP2" "/build/bzip2tmp")
- (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_LIBLZMA" "${xz-src}")
- (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_ZSTD" "${zstd-src}")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_CRYPTOPP-CMAKE" "${
+ fetchFromGitHub {
+ owner = "abdes";
+ repo = "cryptopp-cmake";
+ rev = "866aceb8b13b6427a3c4541288ff412ad54f11ea";
+ hash = "sha256-BjCehnZeTZ87eb0NBEilHFw0BMlpV08Ms+vjP+8dw8o=";
+ }
+ }")
+ (lib.cmakeFeature "CRYPTOPP_SOURCES" "${
+ fetchFromGitHub {
+ owner = "weidai11";
+ repo = "cryptopp";
+ tag = "CRYPTOPP_8_9_0";
+ hash = "sha256-HV+afSFkiXdy840JbHBTR8lLL0GMwsN3QdwaoQmicpQ=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_ZLIB" "${
+ fetchFromGitHub {
+ owner = "zlib-ng";
+ repo = "zlib-ng";
+ tag = "2.2.5";
+ hash = "sha256-c2RYqHi3hj/ViBzJcYWoNib27GAbq/B1SJUfvG7CPG4=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GOOGLETEST" "${
+ fetchFromGitHub {
+ owner = "google";
+ repo = "googletest";
+ tag = "release-1.12.1";
+ hash = "sha256-W+OxRTVtemt2esw4P7IyGWXOonUN5ZuscjvzqkYvZbM=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_LIBLZMA" "${
+ fetchFromGitHub {
+ owner = "tukaani-project";
+ repo = "xz";
+ tag = "v5.8.1";
+ hash = "sha256-vGUNoX5VTM0aQ5GmBPXip97WGN9vaVrQLE9msToZyKs=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_ZSTD" "${
+ fetchFromGitHub {
+ owner = "facebook";
+ repo = "zstd";
+ tag = "v1.5.7";
+ hash = "sha256-tNFWIT9ydfozB8dWcmTMuZLCQmQudTFJIkSr0aG7S44=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_PPMD" "${
+ fetchFromGitHub{
+ owner = "ip7z";
+ repo = "7zip";
+ tag = "26.00";
+ hash = "sha256-B+piugjEI7+8ILTuDitADY8XseltvV0lYIVecXGib7s=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_QOI" "${
+ fetchFromGitHub {
+ owner = "phoboslab";
+ repo = "qoi";
+ rev = "e084ec009b38c755acc40fe31d3f83ee17935b9d";
+ hash = "sha256-sPwmpkMo++Eo33fsiLHY6QYScXQNCucQyNPJdDysgFw=";
+ }
+ }")
+ (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_TINYEXR" "${
+ fetchFromGitHub {
+ owner = "syoyo";
+ repo = "tinyexr";
+ rev = "4946b5d92e13bcc8102ac2c8efd129596a90bf75";
+ hash = "sha256-tp+T64qQBIll0ZdZSnEgE2cLijImBXzufebPKskdSU4=";
+ }
+ }")
+
(lib.cmakeBool "MZ_OPENSSL" true)
+ # the build explodes due to bzip2 being a target twice or something.
+ # i'm not just going to drop everything and acquire a sufficient
+ # understanding of cmake to actually remedy this (i think i'd
+ # actually rather eat the contents of a sharps container like a
+ # bowl of cereal, singing what shall we do with the drunken sailor)
+ # so either this gets unfucked in the fetchcontent tree of a future
+ # release or you're just out of luck. soz
+ (lib.cmakeBool "MZ_BZIP2" false)
(lib.cmakeBool "MARETF_BUILD_INSTALLER" true)
(lib.cmakeFeature "CPACK_GENERATOR" "DEB")
];
postUnpack = ''
- cp -r ${self.bzip2-src} /build/bzip2tmp
+ cp -r ${fetchgit {
+ url = "https://gitlab.com/bzip2/bzip2";
+ rev = "66c46b8c9436613fd81bc5d03f63a61933a4dcc3";
+ hash = "sha256-JuwmLBwtUPW9Wt31wIX5NMCu0VTxt16XaBQ2c5rFTY4=";
+ }} /build/bzip2tmp
chmod -R +w /build/bzip2tmp
+ cp -r ${fetchFromGitHub {
+ owner = "craftablescience";
+ repo = "minizip-ng";
+ rev = "de1f8bba0b7dbd0920289768edad8d878c95421f";
+ hash = "sha256-zYXl2iaphOjRb7walXTlOr5hpsgT19rwwDkLQ2c21N0=";
+ }} /build/minizip-ngtmp
+ chmod -R +w /build/minizip-ngtmp
'';
LANG = "C.UTF-8";
diff --git a/srcds-pkgs/maretf/fix-miniz-cmake-dirs.patch b/srcds-pkgs/maretf/fix-miniz-cmake-dirs.patch
deleted file mode 100644
index 982aec8..0000000
--- a/srcds-pkgs/maretf/fix-miniz-cmake-dirs.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/ext/sourcepp/ext/miniz/miniz.pc.in
-+++ b/ext/sourcepp/ext/miniz/miniz.pc.in
-@@ -1,13 +1,12 @@
--prefix=@CMAKE_INSTALL_PREFIX@
--exec_prefix=${prefix}
--libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
--includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@
--
--Name: @PROJECT_NAME@
--Description: @PROJECT_DESCRIPTION@
--Version: @MINIZ_VERSION@
--URL: @PROJECT_HOMEPAGE_URL@
--
--Requires:
--Libs: -L${libdir} -lminiz
--Cflags: -I${includedir}
-+prefix=@CMAKE_INSTALL_PREFIX@
-+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
-+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/@PROJECT_NAME@
-+
-+Name: @PROJECT_NAME@
-+Description: @PROJECT_DESCRIPTION@
-+Version: @MINIZ_VERSION@
-+URL: @PROJECT_HOMEPAGE_URL@
-+
-+Requires:
-+Libs: -L${libdir} -lminiz
-+Cflags: -I${includedir}