Files
nixpkgs/pkgs/by-name/li/libtoxcore/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

73 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
libsodium,
ncurses,
libopus,
libvpx,
check,
libconfig,
pkg-config,
}:
let
buildToxAV = !stdenv.hostPlatform.isAarch32;
in
stdenv.mkDerivation (finalAttrs: {
pname = "libtoxcore";
version = "0.2.21";
src = fetchFromGitHub {
owner = "TokTok";
repo = "c-toxcore";
tag = "v${finalAttrs.version}";
hash = "sha256-0lWUKW09JvHa0QDX7v4n5B2ckQrKU9TDkjKegDLTIUw=";
fetchSubmodules = true;
};
cmakeFlags = [
(lib.cmakeBool "DHT_BOOTSTRAP" true)
(lib.cmakeBool "BOOTSTRAP_DAEMON" true)
]
++ lib.optional buildToxAV (lib.cmakeBool "MUST_BUILD_TOXAV" true);
buildInputs = [
libsodium
ncurses
libconfig
]
++ lib.optionals buildToxAV [
libopus
libvpx
];
nativeBuildInputs = [
cmake
pkg-config
];
doCheck = true;
nativeCheckInputs = [ check ];
postInstall = ''
substituteInPlace $out/lib/pkgconfig/toxcore.pc \
--replace '=''${prefix}/' '=' \
'';
# We might be getting the wrong pkg-config file anyway:
# https://github.com/TokTok/c-toxcore/issues/2334
meta = {
description = "P2P FOSS instant messaging application aimed to replace Skype";
homepage = "https://tox.chat";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
peterhoeg
zatm8
];
platforms = lib.platforms.all;
};
})