git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #32417 from oxij/pkg/ratox

ratox: 0.2.1 -> 0.4

commitcc8705dcc656663169c9b376c32f3cd1a83a9083 authorOrivej Desh <orivej@gmx.fr> dateSat 23 Dec 2017, 23:07 (9 years ago) parentae15ee4ea47746
4 files changed+26−78
pkgs/applications/networking/instant-messengers/ratox/default.nix+20−14 pkgs/applications/networking/instant-messengers/ratox/ldlibs.patch+5 pkgs/development/libraries/libtoxcore/old-api.nix−59 pkgs/top-level/all-packages.nix+1−5
pkgs/applications/networking/instant-messengers/ratox/default.nix+20−14
@@ -1,28 +1,34 @@
1−{ stdenv, fetchurl, libtoxcore
1+{ stdenv, fetchgit, libtoxcore
22, conf ? null }:
33
44with stdenv.lib;
55
6+let
7+ configFile = optionalString (conf!=null) (builtins.toFile "config.h" conf);
8+in
9+
610stdenv.mkDerivation rec {
7− name = "ratox-0.2.1";
11+ name = "ratox-0.4";
812
9− src = fetchurl {
10− url = "http://git.2f30.org/ratox/snapshot/${name}.tar.gz";
11− sha256 = "0xnw3zcz9frmcxqhwg38hhnsy1g5xl9yc19nl0vwi5awz8wqqy19";
13+ src = fetchgit {
14+ url = "git://git.2f30.org/ratox.git";
15+ rev = "0db821b7bd566f6cfdc0cc5a7bbcc3e5e92adb4c";
16+ sha256 = "0wmf8hydbcq4bkpsld9vnqw4zfzf3f04vhgwy17nd4p5p389fbl5";
1217 };
1318
19+ patches = [ ./ldlibs.patch ];
20+
1421 buildInputs = [ libtoxcore ];
1522
16− configFile = optionalString (conf!=null) (builtins.toFile "config.h" conf);
1723 preConfigure = optionalString (conf!=null) "cp ${configFile} config.def.h";
1824
19− preBuild = "makeFlags=PREFIX=$out";
25+ makeFlags = [ "PREFIX=$(out)" ];
2026
21− meta =
22− { description = "FIFO based tox client";
23− homepage = http://ratox.2f30.org/;
24− license = licenses.isc;
25− maintainers = with maintainers; [ ehmry ];
26− platforms = platforms.linux;
27− };
27+ meta = {
28+ description = "FIFO based tox client";
29+ homepage = http://ratox.2f30.org/;
30+ license = licenses.isc;
31+ maintainers = with maintainers; [ ehmry ];
32+ platforms = platforms.linux;
33+ };
2834}
pkgs/applications/networking/instant-messengers/ratox/ldlibs.patchnew file+5
@@ -0,0 +1,5 @@
1+--- a/config.mk
2++++ b/config.mk
3+@@ -13 +13 @@ LDFLAGS = -L/usr/local/lib
4+-LDLIBS = -ltoxcore -ltoxav -ltoxencryptsave -lsodium -lopus -lvpx -lm -lpthread
5++LDLIBS = -ltoxcore -ltoxav -ltoxencryptsave -lm -lpthread
pkgs/development/libraries/libtoxcore/old-api.nixdeleted−59
@@ -1,59 +0,0 @@
1−{ stdenv, fetchFromGitHub, autoreconfHook, libsodium, ncurses, libopus
2−, libvpx, check, libconfig, pkgconfig }:
3−
4−let
5− version = "4c220e336330213b151a0c20307d0a1fce04ac9e";
6− date = "20150126";
7−
8−in stdenv.mkDerivation rec {
9− name = "tox-core-old-${date}-${builtins.substring 0 7 version}";
10−
11− src = fetchFromGitHub {
12− owner = "irungentoo";
13− repo = "toxcore";
14− rev = version;
15− sha256 = "152yamak9ykl8dgkx1qzyrpa3f4xr1s8lgcb5k58r9lb1iwnhvqc";
16− };
17−
18− NIX_LDFLAGS = "-lgcc_s";
19−
20− postPatch = ''
21− # within Nix chroot builds, localhost is unresolvable
22− sed -i -e '/DEFTESTCASE(addr_resolv_localhost)/d' \
23− auto_tests/network_test.c
24− # takes WAAAY too long (~10 minutes) and would timeout
25− sed -i -e '/DEFTESTCASE[^(]*(many_clients\>/d' \
26− auto_tests/tox_test.c
27− '';
28−
29− configureFlags = [
30− "--with-libsodium-headers=${libsodium.dev}/include"
31− "--with-libsodium-libs=${libsodium.out}/lib"
32− "--enable-ntox"
33− "--enable-daemon"
34− ];
35−
36− buildInputs = [
37− autoreconfHook libsodium ncurses
38− check libconfig pkgconfig
39− ] ++ stdenv.lib.optionals (!stdenv.isArm) [
40− libopus
41− ];
42−
43− propagatedBuildInputs = stdenv.lib.optionals (!stdenv.isArm) [ libvpx ];
44−
45− # Some tests fail randomly due to timeout. This kind of problem is well known
46− # by upstream: https://github.com/irungentoo/toxcore/issues/{950,1054}
47− # They don't recommend running tests on 50core machines with other cpu-bound
48− # tests running in parallel.
49− #
50− # NOTE: run the tests locally on your machine before upgrading this package!
51− doCheck = false;
52−
53− meta = with stdenv.lib; {
54− description = "P2P FOSS instant messaging application aimed to replace Skype with crypto";
55− license = licenses.gpl3Plus;
56− maintainers = with maintainers; [ viric jgeerds ];
57− platforms = platforms.all;
58− };
59−}
pkgs/top-level/all-packages.nix+1−5
@@ -9782,8 +9782,6 @@ with pkgs;
97829782
97839783 libtorrentRasterbar_1_0 = callPackage ../development/libraries/libtorrent-rasterbar/1.0.nix { };
97849784
9785− libtoxcore-old = callPackage ../development/libraries/libtoxcore/old-api.nix { };
9786−
97879785 libtoxcore-new = callPackage ../development/libraries/libtoxcore/new-api.nix { };
97889786
97899787 libtoxcore = callPackage ../development/libraries/libtoxcore { };
@@ -16625,9 +16623,7 @@ with pkgs;
1662516623
1662616624 ratmen = callPackage ../tools/X11/ratmen {};
1662716625
16628− ratox = callPackage ../applications/networking/instant-messengers/ratox {
16629− libtoxcore = libtoxcore-old;
16630− };
16626+ ratox = callPackage ../applications/networking/instant-messengers/ratox { };
1663116627
1663216628 ratpoison = callPackage ../applications/window-managers/ratpoison { };
1663316629