about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-02-09 18:01:06 +0000
committerGitHub <noreply@github.com>2024-02-09 18:01:06 +0000
commitb64b4f2d6ab0380c89585108ca0331654f0ac507 (patch)
treeabb735d71e3da25ac120f2148273e72aed71bacc /pkgs/tools
parenta59991b77b4d9d16b25f7f1c9db8309d8ae207c2 (diff)
parent61950db5f823519e6440ee9e7d829a856c6dd8fa (diff)
downloadnixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.tar
nixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.tar.gz
nixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.tar.bz2
nixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.tar.lz
nixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.tar.xz
nixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.tar.zst
nixlib-b64b4f2d6ab0380c89585108ca0331654f0ac507.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/plantuml/default.nix4
-rw-r--r--pkgs/tools/security/tor/torsocks-gethostbyaddr-darwin.patch33
-rw-r--r--pkgs/tools/security/tor/torsocks.nix47
-rw-r--r--pkgs/tools/system/netdata/go.d.plugin.nix6
4 files changed, 71 insertions, 19 deletions
diff --git a/pkgs/tools/misc/plantuml/default.nix b/pkgs/tools/misc/plantuml/default.nix
index 24f8187aadd9..79e742989cac 100644
--- a/pkgs/tools/misc/plantuml/default.nix
+++ b/pkgs/tools/misc/plantuml/default.nix
@@ -1,12 +1,12 @@
 { lib, stdenv, fetchurl, makeWrapper, jre, graphviz }:
 
 stdenv.mkDerivation rec {
-  version = "1.2024.0";
+  version = "1.2024.1";
   pname = "plantuml";
 
   src = fetchurl {
     url = "https://github.com/plantuml/plantuml/releases/download/v${version}/plantuml-pdf-${version}.jar";
-    sha256 = "sha256-jpO4BhOyTS9y2e9d3AK911HDQa04zhPeFGyhz1FJN+Q=";
+    sha256 = "sha256-lXo8eU6IX4JQFfhNUM2h6fi0HkShiwLsjMRTNbwLYwk=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/security/tor/torsocks-gethostbyaddr-darwin.patch b/pkgs/tools/security/tor/torsocks-gethostbyaddr-darwin.patch
new file mode 100644
index 000000000000..d7d834271a94
--- /dev/null
+++ b/pkgs/tools/security/tor/torsocks-gethostbyaddr-darwin.patch
@@ -0,0 +1,33 @@
+diff --git a/tests/test_dns.c b/tests/test_dns.c
+index 7e07663..acf095c 100644
+--- a/tests/test_dns.c
++++ b/tests/test_dns.c
+@@ -76,6 +76,8 @@ static void test_gethostbyname(const struct test_host *host)
+ 	return;
+ }
+ 
++#ifdef __linux__
++
+ static void test_gethostbyaddr_r_failed(void)
+ {
+ 	int result;
+@@ -129,6 +131,8 @@ static void test_gethostbyaddr_r(const struct test_host *host)
+   ok(1, "Resolved address");
+ }
+ 
++#endif
++
+ static void test_gethostbyaddr(const struct test_host *host)
+ {
+ 	struct hostent *he;
+@@ -199,8 +203,10 @@ int main(int argc, char **argv)
+ 	test_getaddrinfo(&tor_check);
+ 	test_gethostbyname(&tor_dir_auth1);
+ 	test_gethostbyaddr(&tor_dir_auth2);
++#ifdef __linux__
+ 	test_gethostbyaddr_r(&tor_dir_auth2);
+ 	test_gethostbyaddr_r_failed();
++#endif
+ 	test_getaddrinfo(&tor_localhost);
+ 
+ end:
diff --git a/pkgs/tools/security/tor/torsocks.nix b/pkgs/tools/security/tor/torsocks.nix
index 16eeca0ffad7..6c5be8fcc7bd 100644
--- a/pkgs/tools/security/tor/torsocks.nix
+++ b/pkgs/tools/security/tor/torsocks.nix
@@ -1,22 +1,39 @@
-{ lib, stdenv, fetchgit, fetchurl, autoreconfHook, libcap }:
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, autoreconfHook
+, libcap
+}:
 
 stdenv.mkDerivation rec {
   pname = "torsocks";
-  version = "2.3.0";
+  version = "2.4.0";
 
-  src = fetchgit {
-    url    = "https://git.torproject.org/torsocks.git";
-    rev    = "refs/tags/v${version}";
-    sha256 = "0x0wpcigf22sjxg7bm0xzqihmsrz51hl4v8xf91qi4qnmr4ny1hb";
+  src = fetchFromGitLab {
+    domain = "gitlab.torproject.org";
+    group = "tpo";
+    owner = "core";
+    repo = "torsocks";
+    rev = "v${version}";
+    sha256 = "sha256-ocJkoF9LMLC84ukFrm5pzjp/1gaXqDz8lzr9TdG+f88=";
   };
 
-  nativeBuildInputs = [ autoreconfHook ];
-
-  patches = lib.optional stdenv.isDarwin
-    (fetchurl {
-       url = "https://trac.torproject.org/projects/tor/raw-attachment/ticket/28538/0001-Fix-macros-for-accept4-2.patch";
-       sha256 = "97881f0b59b3512acc4acb58a0d6dfc840d7633ead2f400fad70dda9b2ba30b0";
-     });
+  patches = [
+    # fix compatibility with C99
+    # https://gitlab.torproject.org/tpo/core/torsocks/-/merge_requests/9
+    (fetchpatch {
+      url = "https://gitlab.torproject.org/tpo/core/torsocks/-/commit/1171bf2fd4e7a0cab02cf5fca59090b65af9cd29.patch";
+      hash = "sha256-qu5/0fy72+02QI0cVE/6YrR1kPuJxsZfG8XeODqVOPY=";
+    })
+    # tsocks_libc_accept4 only exists on Linux, use tsocks_libc_accept on other platforms
+    (fetchpatch {
+      url = "https://gitlab.torproject.org/tpo/core/torsocks/uploads/eeec9833512850306a42a0890d283d77/0001-Fix-macros-for-accept4-2.patch";
+      hash = "sha256-XWi8+UFB8XgBFSl5QDJ+hLu/dH4CvAwYbeZz7KB10Bs=";
+    })
+    # no gethostbyaddr_r on darwin
+    ./torsocks-gethostbyaddr-darwin.patch
+  ];
 
   postPatch = ''
     # Patch torify_app()
@@ -29,12 +46,14 @@ stdenv.mkDerivation rec {
       src/bin/torsocks.in
   '';
 
+  nativeBuildInputs = [ autoreconfHook ];
+
   doInstallCheck = true;
   installCheckTarget = "check-recursive";
 
   meta = {
     description      = "Wrapper to safely torify applications";
-    homepage         = "https://github.com/dgoulet/torsocks";
+    homepage         = "https://gitlab.torproject.org/tpo/core/torsocks";
     license          = lib.licenses.gpl2;
     platforms        = lib.platforms.unix;
     maintainers      = with lib.maintainers; [ thoughtpolice ];
diff --git a/pkgs/tools/system/netdata/go.d.plugin.nix b/pkgs/tools/system/netdata/go.d.plugin.nix
index c741d1d62beb..ce53b278a9bd 100644
--- a/pkgs/tools/system/netdata/go.d.plugin.nix
+++ b/pkgs/tools/system/netdata/go.d.plugin.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "netdata-go-plugins";
-  version = "0.58.0";
+  version = "0.58.1";
 
   src = fetchFromGitHub {
     owner = "netdata";
     repo = "go.d.plugin";
     rev = "v${version}";
-    hash = "sha256-XZBF0uNXTo5UcBuhMVznij+QGhHM06j5J2xflZf40kI=";
+    hash = "sha256-zzHm98jec7MXnzVsrLlYIk+ILA3Ei43853dM1LdFz5c=";
   };
 
-  vendorHash = "sha256-bdW6ZDMYVFGWD7KEDU2kaoccgwbOPl7ADnZ1npGBLAc=";
+  vendorHash = "sha256-eb+GRFhfWxDkfH4x2VF3ogyT5z4OcIoqHtEVJ1tGsdA=";
 
   doCheck = false;