aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/maretf
diff options
context:
space:
mode:
Diffstat (limited to 'srcds-pkgs/maretf')
-rw-r--r--srcds-pkgs/maretf/distancealpha.nix196
1 files changed, 196 insertions, 0 deletions
diff --git a/srcds-pkgs/maretf/distancealpha.nix b/srcds-pkgs/maretf/distancealpha.nix
new file mode 100644
index 0000000..d60a0e4
--- /dev/null
+++ b/srcds-pkgs/maretf/distancealpha.nix
@@ -0,0 +1,196 @@
+{ lib, stdenv, fetchFromGitHub, fetchgit
+, cmake, pkg-config, makeWrapper
+, qt6
+, openssl
+, python3
+}:
+stdenv.mkDerivation (self: {
+ pname = "maretf-distancealpha";
+ version = "2026-05-19";
+
+ src = fetchFromGitHub {
+ owner = "partyvan";
+ repo = "maretf";
+ rev = "1022c2473596d9d22c7999ac998734671cd85e6c";
+
+ fetchSubmodules = true;
+ hash = "sha256-ilFmM0COpc/TPrhmVDuDevzAjaVuAPFcrhYODJsxXao=";
+ };
+
+ nativeBuildInputs = [
+ cmake
+ makeWrapper
+ qt6.wrapQtAppsHook
+ python3
+ ];
+
+ buildInputs = [
+ openssl
+ pkg-config
+ qt6.qtbase
+ qt6.qttools
+ ];
+ patchPhase = ''
+ sed -i '/add_sourcepp_remote_library(libtommath/s/)/ EXCLUDE_FROM_ALL)/' ext/sourcepp/ext/_ext.cmake
+ sed -i '/add_sourcepp_remote_library(libtomcrypt/s/)/ EXCLUDE_FROM_ALL)/' ext/sourcepp/ext/_ext.cmake
+ '';
+ webp-src = fetchFromGitHub {
+ owner = "webmproject";
+ repo = "libwebp";
+ rev = "5003e5609eedc5680b8d838a962cbb9a6e9709ce";
+ hash = "sha256-kSH0q+YuhlCosX1szGLpwqPlBMiJ7sjNA1xuEbfZ1OQ=";
+ };
+
+ cmakeFlags = with self; [
+ (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_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_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 ${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";
+
+ meta = {
+ description = "MareTF branch with support for distance mapping";
+ homepage = "https://github.com/partyvan/MareTF";
+ mainProgram = "maretf";
+ license = lib.licenses.mit;
+ platforms = [ "x86_64-linux" ];
+ };
+})