From 5de34446ac1494e71c919a2f7276c11632eebe00 Mon Sep 17 00:00:00 2001 From: mourogurt Date: Sun, 7 Sep 2025 22:19:40 +0300 Subject: [PATCH] libtoxcore: 0.2.20 -> 0.2.21 Also added zatm8 as a maintainer and refactor recipe a bit. --- pkgs/by-name/li/libtoxcore/package.nix | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/li/libtoxcore/package.nix b/pkgs/by-name/li/libtoxcore/package.nix index 334d8e85b8c5..d595aea51a90 100644 --- a/pkgs/by-name/li/libtoxcore/package.nix +++ b/pkgs/by-name/li/libtoxcore/package.nix @@ -1,7 +1,7 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, cmake, libsodium, ncurses, @@ -15,22 +15,23 @@ let buildToxAV = !stdenv.hostPlatform.isAarch32; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libtoxcore"; - version = "0.2.20"; + version = "0.2.21"; - src = - # We need the prepared sources tarball. - fetchurl { - url = "https://github.com/TokTok/c-toxcore/releases/download/v${version}/c-toxcore-${version}.tar.gz"; - hash = "sha256-qciaja6nRdU+XXjnqsuZx7R5LEQApaaccSOPRdYWT0w="; - }; + src = fetchFromGitHub { + owner = "TokTok"; + repo = "c-toxcore"; + tag = "v${finalAttrs.version}"; + hash = "sha256-0lWUKW09JvHa0QDX7v4n5B2ckQrKU9TDkjKegDLTIUw="; + fetchSubmodules = true; + }; cmakeFlags = [ - "-DDHT_BOOTSTRAP=ON" - "-DBOOTSTRAP_DAEMON=ON" + (lib.cmakeBool "DHT_BOOTSTRAP" true) + (lib.cmakeBool "BOOTSTRAP_DAEMON" true) ] - ++ lib.optional buildToxAV "-DMUST_BUILD_TOXAV=ON"; + ++ lib.optional buildToxAV (lib.cmakeBool "MUST_BUILD_TOXAV" true); buildInputs = [ libsodium @@ -64,7 +65,8 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ peterhoeg + zatm8 ]; platforms = lib.platforms.all; }; -} +})