From 93ea7dd8f9752f68d8bf34b0cf0ecf1f447200e1 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 27 Sep 2022 16:22:45 -0500 Subject: [PATCH] libtoxcore_0_1: remove This version has a known vulnerability https://github.com/advisories/GHSA-62pr-4hg6-fwph --- .../libraries/libtoxcore/default.nix | 92 ++++++++----------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 40 insertions(+), 56 deletions(-) diff --git a/pkgs/development/libraries/libtoxcore/default.nix b/pkgs/development/libraries/libtoxcore/default.nix index 47bc9456d2f7..9d99821426a0 100644 --- a/pkgs/development/libraries/libtoxcore/default.nix +++ b/pkgs/development/libraries/libtoxcore/default.nix @@ -1,60 +1,46 @@ { lib, stdenv, fetchFromGitHub, cmake, libsodium, ncurses, libopus, msgpack , libvpx, check, libconfig, pkg-config }: -let - generic = { version, sha256 }: - stdenv.mkDerivation { - pname = "libtoxcore"; - inherit version; +stdenv.mkDerivation rec { + pname = "libtoxcore"; + version = "0.2.17"; - src = fetchFromGitHub { - owner = "TokTok"; - repo = "c-toxcore"; - rev = "v${version}"; - inherit sha256; - }; - - 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; - }; - }; - -in { - libtoxcore_0_1 = generic { - version = "0.1.11"; - sha256 = "1fya5gfiwlpk6fxhalv95n945ymvp2iidiyksrjw1xw95fzsp1ij"; - }; - - libtoxcore_0_2 = generic { - version = "0.2.17"; + src = fetchFromGitHub { + owner = "TokTok"; + repo = "c-toxcore"; + rev = "v${version}"; sha256 = "sha256-SOI6QKOSt/EK9JDrSaV6CrD5sx8aYb5ZL3StYq8u/Dg="; }; + + 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 ehmry ]; + platforms = platforms.all; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 966824c33328..4f0b4da0a15b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20506,9 +20506,7 @@ with pkgs; libtorrent-rasterbar = libtorrent-rasterbar-2_0_x; - inherit (callPackages ../development/libraries/libtoxcore {}) - libtoxcore_0_1 libtoxcore_0_2; - libtoxcore = libtoxcore_0_2; + libtoxcore = callPackage ../development/libraries/libtoxcore {}; libtpms = callPackage ../tools/security/libtpms { };