From e4b47de69411437a563391a34dda300fee1b006b Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 14 Aug 2016 14:28:05 +0200 Subject: [PATCH] Remove top-level pycrypto See #11567. --- pkgs/applications/graphics/screencloud/default.nix | 6 +++--- pkgs/applications/misc/mysql-workbench/default.nix | 7 +++++-- pkgs/tools/backup/obnam/default.nix | 6 ++---- pkgs/tools/misc/svtplay-dl/default.nix | 10 ++++++---- pkgs/tools/security/knockknock/default.nix | 6 +++--- pkgs/tools/security/volatility/default.nix | 8 +++----- pkgs/top-level/all-packages.nix | 7 +------ pkgs/top-level/python-packages.nix | 2 +- 8 files changed, 24 insertions(+), 28 deletions(-) diff --git a/pkgs/applications/graphics/screencloud/default.nix b/pkgs/applications/graphics/screencloud/default.nix index 5934febb999..6f2b0e34cbb 100644 --- a/pkgs/applications/graphics/screencloud/default.nix +++ b/pkgs/applications/graphics/screencloud/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchFromGitHub, cmake, qt4, quazip, qt-mobility, qxt, python, pycrypto, glib }: +{ stdenv, fetchurl, fetchFromGitHub, cmake, qt4, quazip, qt-mobility, qxt, pythonPackages, glib }: with stdenv.lib; stdenv.mkDerivation rec { @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sha256 = "1s0dxa1sa37nvna5nfqdsp294810favj68qb7ghl78qna7zw0cim"; }; - buildInputs = [ cmake qt4 quazip qt-mobility qxt python pycrypto ]; + buildInputs = [ cmake qt4 quazip qt-mobility qxt pythonPackages.python pythonPackages.pycrypto ]; patchPhase = '' # Required to make the configure script work. Normally, screencloud's @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { postInstall = '' patchShebangs $prefix/opt/screencloud/screencloud.sh substituteInPlace "$prefix/opt/screencloud/screencloud.sh" --replace "/opt" "$prefix/opt" - sed -i "2 i\export PYTHONPATH=$(toPythonPath ${pycrypto}):\$PYTHONPATH" "$prefix/opt/screencloud/screencloud.sh" + sed -i "2 i\export PYTHONPATH=$(toPythonPath ${pythonPackages.pycrypto}):\$PYTHONPATH" "$prefix/opt/screencloud/screencloud.sh" mkdir $prefix/bin mkdir $prefix/lib ln -s $prefix/opt/screencloud/screencloud.sh $prefix/bin/screencloud diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index 056edd801c0..775d344643e 100644 --- a/pkgs/applications/misc/mysql-workbench/default.nix +++ b/pkgs/applications/misc/mysql-workbench/default.nix @@ -3,10 +3,13 @@ , libctemplate, libglade , libiodbc , libgnome, libsigcxx, libuuid, libxml2, libzip, lua, mesa, mysql -, pango, paramiko, pcre, pexpect, pkgconfig, pycrypto, python, sqlite, sudo +, pango, pcre, pkgconfig, sqlite, sudo +, pythonPackages }: -stdenv.mkDerivation rec { +let + inherit (pythonPackages) pexpect pycrypto python paramiko; +in stdenv.mkDerivation rec { pname = "mysql-workbench"; version = "5.2.47"; name = "${pname}-${version}"; diff --git a/pkgs/tools/backup/obnam/default.nix b/pkgs/tools/backup/obnam/default.nix index 0df9fa9d39f..048321ea2e5 100644 --- a/pkgs/tools/backup/obnam/default.nix +++ b/pkgs/tools/backup/obnam/default.nix @@ -1,18 +1,16 @@ -{ stdenv, fetchurl, python, pythonPackages, pycrypto, attr }: +{ stdenv, fetchurl, pythonPackages, attr }: pythonPackages.buildPythonApplication rec { name = "obnam-${version}"; version = "1.19.1"; - namePrefix = ""; - src = fetchurl rec { url = "http://code.liw.fi/debian/pool/main/o/obnam/obnam_${version}.orig.tar.xz"; sha256 = "096abbvz2c9vm8r7zm82yqrd7zj04pb1xzlv6z0dspkngd0cfdqc"; }; buildInputs = [ pythonPackages.sphinx attr ]; - propagatedBuildInputs = [ pycrypto pythonPackages.paramiko pythonPackages.tracing pythonPackages.ttystatus pythonPackages.cliapp pythonPackages.larch pythonPackages.pyyaml pythonPackages.fuse ]; + propagatedBuildInputs = with pythonPackages; [ pycrypto paramiko tracing ttystatus cliapp larch pyyaml fuse ]; doCheck = false; diff --git a/pkgs/tools/misc/svtplay-dl/default.nix b/pkgs/tools/misc/svtplay-dl/default.nix index 7848abcf14d..1169752b9ca 100644 --- a/pkgs/tools/misc/svtplay-dl/default.nix +++ b/pkgs/tools/misc/svtplay-dl/default.nix @@ -1,7 +1,9 @@ -{ stdenv, fetchFromGitHub, makeWrapper, python, perl, zip -, rtmpdump, nose, mock, pycrypto, requests2, substituteAll }: +{ stdenv, fetchFromGitHub, makeWrapper, pythonPackages, perl, zip +, rtmpdump, substituteAll }: -stdenv.mkDerivation rec { +let + inherit (pythonPackages) python nose pycrypto requests2 mock; +in stdenv.mkDerivation rec { name = "svtplay-dl-${version}"; version = "1.1"; @@ -24,7 +26,7 @@ stdenv.mkDerivation rec { --replace 'PYTHONPATH=lib' 'PYTHONPATH=lib:$PYTHONPATH' ''; - makeFlags = "PREFIX=$(out) SYSCONFDIR=$(out)/etc PYTHON=${python}/bin/python"; + makeFlags = "PREFIX=$(out) SYSCONFDIR=$(out)/etc PYTHON=${python.interpreter}"; postInstall = '' wrapProgram "$out/bin/svtplay-dl" \ diff --git a/pkgs/tools/security/knockknock/default.nix b/pkgs/tools/security/knockknock/default.nix index 089dd0de2bd..7e4ff32e880 100644 --- a/pkgs/tools/security/knockknock/default.nix +++ b/pkgs/tools/security/knockknock/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, buildPythonApplication, python, pycrypto, hping }: +{ stdenv, fetchFromGitHub, pythonPackages, buildPythonApplication, hping }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { rev = "bf14bbff"; name = "knockknock-r${rev}"; @@ -11,7 +11,7 @@ buildPythonApplication rec { sha256 = "1chpfs3w2vkjrgay69pbdr116z1jldv53fi768a1i05fdqhy1px4"; }; - propagatedBuildInputs = [ pycrypto ]; + propagatedBuildInputs = [ pythonPackages.pycrypto ]; patchPhase = '' sed -i '/build\//d' setup.py diff --git a/pkgs/tools/security/volatility/default.nix b/pkgs/tools/security/volatility/default.nix index 511da154c50..6f1b7fe6ef4 100644 --- a/pkgs/tools/security/volatility/default.nix +++ b/pkgs/tools/security/volatility/default.nix @@ -1,10 +1,8 @@ -{ stdenv, fetchurl, buildPythonApplication, pycrypto }: +{ stdenv, fetchurl, pythonPackages }: -buildPythonApplication rec { - namePrefix = ""; +pythonPackages.buildPythonApplication rec { name = "volatility-2.4"; - src = fetchurl { url = "http://downloads.volatilityfoundation.org/releases/2.4/${name}.tar.gz"; sha256 = "1wffrkvj2lrkqhwamyix9fy05y6g6w8h1sz2iqlm6i6ag7yxykv8"; @@ -12,7 +10,7 @@ buildPythonApplication rec { doCheck = false; - propagatedBuildInputs = [ pycrypto ]; + propagatedBuildInputs = [ pythonPackages.pycrypto ]; meta = with stdenv.lib; { homepage = https://code.google.com/p/volatility; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 89e853be7e6..e516f832c25 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3624,9 +3624,7 @@ in svnfs = callPackage ../tools/filesystems/svnfs { }; - svtplay-dl = callPackage ../tools/misc/svtplay-dl { - inherit (pythonPackages) nose mock requests2; - }; + svtplay-dl = callPackage ../tools/misc/svtplay-dl { }; sysbench = callPackage ../development/tools/misc/sysbench {}; @@ -10052,8 +10050,6 @@ in pycapnp = pythonPackages.pycapnp; - pycrypto = pythonPackages.pycrypto; - pyexiv2 = pythonPackages.pyexiv2; pygobject = pythonPackages.pygobject; @@ -17240,7 +17236,6 @@ in mysqlWorkbench = newScope gnome ../applications/misc/mysql-workbench { lua = lua5_1; libctemplate = libctemplate_2_2; - inherit (pythonPackages) pexpect paramiko; }; redis-desktop-manager = qt55.callPackage ../applications/misc/redis-desktop-manager { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 73a60000b73..897e0f160bf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1940,7 +1940,7 @@ in modules // { sha256 = "0grid93yz6i6jb2zggrqncp5awdf7qi88j5y2k7dq0k9r6b8zydw"; }; - propagatedBuildInputs = with stdenv.lib; with pkgs; [ modules.curses zlib xz ncompress gzip bzip2 gnutar p7zip cabextract lzma pycrypto ] + propagatedBuildInputs = with stdenv.lib; with pkgs; [ modules.curses zlib xz ncompress gzip bzip2 gnutar p7zip cabextract lzma self.pycrypto ] ++ optional visualizationSupport [ pyqtgraph ]; meta = with stdenv.lib; {