1{ stdenv, fetchurl, buildPythonPackage, pycryptodome }:
2
3# This is a dummy package providing the drop-in replacement pycryptodome.
4# https://github.com/NixOS/nixpkgs/issues/21671
5
6buildPythonPackage rec {
7 version = pycryptodome.version;
8 pname = "pycrypto";
9 name = "${pname}-${version}";
10
11 # Cannot build wheel otherwise (zip 1980 issue)
12 SOURCE_DATE_EPOCH=315532800;
13
14 # We need to have a dist-info folder, so let's create one with setuptools
15 unpackPhase = ''
16 echo "from setuptools import setup; setup(name='${pname}', version='${version}', install_requires=['pycryptodome'])" > setup.py
17 '';
18
19 propagatedBuildInputs = [ pycryptodome ];
20
21 # Our dummy has no tests
22 doCheck = false;
23
24 meta = {
25 homepage = http://www.pycrypto.org/;
26 description = "Python Cryptography Toolkit";
27 platforms = pycryptodome.meta.platforms;
28 };
29}