From 358710fa4d236f3affba42cf91af338946a91e1f Mon Sep 17 00:00:00 2001 From: yuuko Date: Tue, 2 Sep 2025 13:17:36 -0700 Subject: maretf: init @ 0.7.3 --- srcds-pkgs/maretf/default.nix | 94 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 srcds-pkgs/maretf/default.nix (limited to 'srcds-pkgs/maretf/default.nix') diff --git a/srcds-pkgs/maretf/default.nix b/srcds-pkgs/maretf/default.nix new file mode 100644 index 0000000..4eb09b1 --- /dev/null +++ b/srcds-pkgs/maretf/default.nix @@ -0,0 +1,94 @@ +{ lib, stdenv, fetchFromGitHub, fetchgit +, cmake, pkg-config, makeWrapper +, qt6 +, bzip2, xz, zstd, zlib-ng +, openssl, cryptopp +}: +stdenv.mkDerivation (self: { + pname = "maretf"; + version = "0.7.3"; + + 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="; + }; + + nativeBuildInputs = [ + cmake + makeWrapper + qt6.wrapQtAppsHook + ]; + + buildInputs = [ + bzip2 + cryptopp + openssl + pkg-config + qt6.qtbase + qt6.qttools + xz + zlib-ng + zstd + ]; + + patches = [ ./fix-miniz-cmake-dirs.patch ]; + cmakeFlags = with self; [ + (lib.cmakeFeature "CRYPTOPP_SOURCES" "${cryptopp-src}") + (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_ZLIB" "${zlib-src}") + (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.cmakeBool "MZ_OPENSSL" true) + (lib.cmakeBool "MARETF_BUILD_INSTALLER" true) + (lib.cmakeFeature "CPACK_GENERATOR" "DEB") + ]; + + postUnpack = '' + cp -r ${self.bzip2-src} /build/bzip2tmp + chmod -R +w /build/bzip2tmp + ''; + + LANG = "C.UTF-8"; + + meta = { + description = "Utility to create, edit, and display every type of VTF file ever made"; + homepage = "https://github.com/craftablescience/MareTF"; + mainProgram = "maretf"; + license = lib.licenses.mit; + platforms = [ "x86_64-linux" ]; + changelog = "https://github.com/craftablescience/MareTF/releases/tag/v${self.version}"; + }; +}) -- cgit v1.2.3