From d92d0eca9230b5154bc690a90c1ddc7508fb0ee7 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 5 Dec 2014 22:32:56 -0600 Subject: [PATCH] nixpkgs: torsocks 1.3 -> 2.0.0 Additionally, this fixes 'torsocks' using the 'which' executable as a dependency. Signed-off-by: Austin Seipp --- pkgs/tools/security/tor/torsocks.nix | 30 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/security/tor/torsocks.nix b/pkgs/tools/security/tor/torsocks.nix index 7db547bbe1c..d4a725fa04a 100644 --- a/pkgs/tools/security/tor/torsocks.nix +++ b/pkgs/tools/security/tor/torsocks.nix @@ -1,13 +1,13 @@ -{ stdenv, fetchgit, autoreconfHook }: +{ stdenv, fetchgit, autoreconfHook, which }: + stdenv.mkDerivation rec { - pname = "torsocks"; - name = "${pname}-${version}"; - version = "1.3"; - + name = "torsocks-${version}"; + version = "2.0.0"; + src = fetchgit { - url = meta.repositories.git; - rev = "refs/tags/${version}"; - sha256 = "1cqplb36fkdb81kzf48xlxclf64wnp8r56x1gjayax1h6x4aal1w"; + url = meta.repositories.git; + rev = "refs/tags/v${version}"; + sha256 = "e3868ae8baadce1854cc9e604a5fcfa0433a15e4eb1223cc9da5b3c586db0048"; }; buildInputs = [ autoreconfHook ]; @@ -15,11 +15,17 @@ stdenv.mkDerivation rec { export configureFlags="$configureFlags --libdir=$out/lib" ''; + patchPhase = '' + substituteInPlace src/bin/torsocks.in \ + --replace which ${which}/bin/which + ''; + meta = { - description = "use socks-friendly applications with Tor"; - homepage = http://code.google.com/p/torsocks/; + description = "Wrapper to safely torify applications"; + homepage = http://code.google.com/p/torsocks/; repositories.git = https://git.torproject.org/torsocks.git; - license = stdenv.lib.licenses.gpl2; - maintainers = [ stdenv.lib.maintainers.phreedom ]; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ phreedom thoughtpolice ]; }; }