diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/libtoxcore | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libtoxcore')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libtoxcore/default.nix | 91 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libtoxcore/new-api.nix | 58 |
2 files changed, 39 insertions, 110 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix b/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix index 47bc9456d2f7..63e0dae08a3f 100644 --- a/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix +++ b/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix @@ -1,60 +1,47 @@ -{ lib, stdenv, fetchFromGitHub, cmake, libsodium, ncurses, libopus, msgpack +{ lib, stdenv, fetchurl, cmake, libsodium, ncurses, libopus, msgpack , libvpx, check, libconfig, pkg-config }: -let - generic = { version, sha256 }: - stdenv.mkDerivation { - pname = "libtoxcore"; - inherit version; - - src = fetchFromGitHub { - owner = "TokTok"; - repo = "c-toxcore"; - rev = "v${version}"; - inherit sha256; +let buildToxAV = !stdenv.isAarch32; +in stdenv.mkDerivation rec { + pname = "libtoxcore"; + version = "0.2.18"; + + src = + # We need the prepared sources tarball. + fetchurl { + url = + "https://github.com/TokTok/c-toxcore/releases/download/v${version}/c-toxcore-${version}.tar.gz"; + sha256 = "sha256-8pQFN5mIY1k+KLxqa19W8JZ19s2KKDJre8MbSDbAiUI="; }; - cmakeFlags = [ - "-DBUILD_NTOX=ON" - "-DDHT_BOOTSTRAP=ON" - "-DBOOTSTRAP_DAEMON=ON" - ]; - - buildInputs = [ - libsodium msgpack ncurses libconfig - ] ++ lib.optionals (!stdenv.isAarch32) [ - libopus libvpx - ]; - - nativeBuildInputs = [ cmake pkg-config ]; - - doCheck = false; # hangs, tries to access the net? - checkInputs = [ check ]; - - postFixup ='' - sed -i $out/lib/pkgconfig/*.pc \ - -e "s|^libdir=.*|libdir=$out/lib|" \ - -e "s|^includedir=.*|includedir=$out/include|" - ''; - - meta = with lib; { - broken = stdenv.isDarwin; - description = "P2P FOSS instant messaging application aimed to replace Skype"; - homepage = "https://tox.chat"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ peterhoeg ]; - platforms = platforms.all; - }; - }; + cmakeFlags = + [ "-DBUILD_NTOX=ON" "-DDHT_BOOTSTRAP=ON" "-DBOOTSTRAP_DAEMON=ON" ] + ++ lib.optional buildToxAV "-DMUST_BUILD_TOXAV=ON"; -in { - libtoxcore_0_1 = generic { - version = "0.1.11"; - sha256 = "1fya5gfiwlpk6fxhalv95n945ymvp2iidiyksrjw1xw95fzsp1ij"; - }; + buildInputs = [ + libsodium msgpack 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 - libtoxcore_0_2 = generic { - version = "0.2.17"; - sha256 = "sha256-SOI6QKOSt/EK9JDrSaV6CrD5sx8aYb5ZL3StYq8u/Dg="; + meta = with lib; { + description = "P2P FOSS instant messaging application aimed to replace Skype"; + homepage = "https://tox.chat"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ peterhoeg ehmry ]; + platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/development/libraries/libtoxcore/new-api.nix b/nixpkgs/pkgs/development/libraries/libtoxcore/new-api.nix deleted file mode 100644 index 831ff2447a21..000000000000 --- a/nixpkgs/pkgs/development/libraries/libtoxcore/new-api.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, libsodium, ncurses, libopus -, libvpx, check, libconfig, pkg-config }: - -stdenv.mkDerivation { - pname = "tox-core-new"; - version = "unstable-2016-07-27"; - - src = fetchFromGitHub { - owner = "irungentoo"; - repo = "toxcore"; - rev = "755f084e8720b349026c85afbad58954cb7ff1d4"; - sha256 = "0ap1gvlyihnfivv235dbrgsxsiiz70bhlmlr5gn1027w3h5kqz8w"; - }; - - NIX_LDFLAGS = "-lgcc_s"; - - postPatch = '' - # within Nix chroot builds, localhost is unresolvable - sed -i -e '/DEFTESTCASE(addr_resolv_localhost)/d' \ - auto_tests/network_test.c - # takes WAAAY too long (~10 minutes) and would timeout - sed -i -e '/DEFTESTCASE[^(]*(many_clients\>/d' \ - auto_tests/tox_test.c - ''; - - configureFlags = [ - "--with-libsodium-headers=${libsodium.dev}/include" - "--with-libsodium-libs=${libsodium.out}/lib" - "--enable-ntox" - "--enable-daemon" - ]; - - - nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ - autoreconfHook libsodium ncurses check libconfig - ] ++ lib.optionals (!stdenv.isAarch32) [ - libopus - ]; - - propagatedBuildInputs = lib.optionals (!stdenv.isAarch32) [ libvpx ]; - - # Some tests fail randomly due to timeout. This kind of problem is well known - # by upstream: https://github.com/irungentoo/toxcore/issues/{950,1054} - # They don't recommend running tests on 50core machines with other cpu-bound - # tests running in parallel. - # - # NOTE: run the tests locally on your machine before upgrading this package! - doCheck = false; - - meta = with lib; { - broken = stdenv.isDarwin; - description = "P2P FOSS instant messaging application aimed to replace Skype with crypto"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ ]; - platforms = platforms.all; - }; -} |