lol

torsocks: 2.4.0 -> 2.5.0

+19 -27
+19 -27
pkgs/by-name/to/torsocks/package.nix
··· 5 5 fetchpatch, 6 6 autoreconfHook, 7 7 libcap, 8 + nix-update-script, 9 + versionCheckHook, 8 10 }: 9 11 10 - stdenv.mkDerivation rec { 12 + stdenv.mkDerivation (finalAttrs: { 11 13 pname = "torsocks"; 12 - version = "2.4.0"; 14 + version = "2.5.0"; 13 15 14 16 src = fetchFromGitLab { 15 17 domain = "gitlab.torproject.org"; 16 18 group = "tpo"; 17 19 owner = "core"; 18 20 repo = "torsocks"; 19 - rev = "v${version}"; 20 - sha256 = "sha256-ocJkoF9LMLC84ukFrm5pzjp/1gaXqDz8lzr9TdG+f88="; 21 + tag = "v${finalAttrs.version}"; 22 + hash = "sha256-um5D6d/fzKynfa1kA/VbdnKvAlZ7jQs+pmOgWQMpwgM="; 21 23 }; 24 + 25 + nativeBuildInputs = [ autoreconfHook ]; 22 26 23 27 patches = [ 24 - # fix compatibility with C99 25 - # https://gitlab.torproject.org/tpo/core/torsocks/-/merge_requests/9 26 - (fetchpatch { 27 - url = "https://gitlab.torproject.org/tpo/core/torsocks/-/commit/1171bf2fd4e7a0cab02cf5fca59090b65af9cd29.patch"; 28 - hash = "sha256-qu5/0fy72+02QI0cVE/6YrR1kPuJxsZfG8XeODqVOPY="; 29 - }) 30 28 # tsocks_libc_accept4 only exists on Linux, use tsocks_libc_accept on other platforms 31 29 (fetchpatch { 32 30 url = "https://gitlab.torproject.org/tpo/core/torsocks/uploads/eeec9833512850306a42a0890d283d77/0001-Fix-macros-for-accept4-2.patch"; ··· 36 34 ./torsocks-gethostbyaddr-darwin.patch 37 35 ]; 38 36 39 - postPatch = 40 - '' 41 - # Patch torify_app() 42 - sed -i \ 43 - -e 's,\(local app_path\)=`which $1`,\1=`type -P $1`,' \ 44 - src/bin/torsocks.in 45 - '' 46 - + lib.optionalString stdenv.hostPlatform.isLinux '' 47 - sed -i \ 48 - -e 's,\(local getcap\)=.*,\1=${libcap}/bin/getcap,' \ 49 - src/bin/torsocks.in 50 - ''; 51 - 52 - nativeBuildInputs = [ autoreconfHook ]; 37 + postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' 38 + substituteInPlace src/bin/torsocks.in --replace-fail \ 39 + '"$(PATH="$PATH:/usr/sbin:/sbin" command -v getcap)"' '${libcap}/bin/getcap' 40 + ''; 53 41 54 42 doInstallCheck = true; 55 43 installCheckTarget = "check-recursive"; 44 + nativeInstallCheckInputs = [ versionCheckHook ]; 45 + 46 + passthru.updateScript = nix-update-script { }; 56 47 57 48 meta = { 49 + changelog = "https://gitlab.torproject.org/tpo/core/torsocks/-/releases/v${finalAttrs.version}"; 58 50 description = "Wrapper to safely torify applications"; 59 - mainProgram = "torsocks"; 60 51 homepage = "https://gitlab.torproject.org/tpo/core/torsocks"; 61 52 license = lib.licenses.gpl2Plus; 53 + mainProgram = "torsocks"; 54 + maintainers = with lib.maintainers; [ thoughtpolice ]; 62 55 platforms = lib.platforms.unix; 63 - maintainers = with lib.maintainers; [ thoughtpolice ]; 64 56 }; 65 - } 57 + })