summary refs log tree commit diff
path: root/pkgs/development/python-modules/pycrypto/default.nix
blob: e7858888d36106cd661d715b9f926c608e16f88a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ buildPythonPackage, pycryptodome }:

# This is a dummy package providing the drop-in replacement pycryptodome.
# https://github.com/NixOS/nixpkgs/issues/21671

buildPythonPackage rec {
  version = pycryptodome.version;
  pname = "pycrypto";

  # Cannot build wheel otherwise (zip 1980 issue)
  SOURCE_DATE_EPOCH=315532800;

  # We need to have a dist-info folder, so let's create one with setuptools
  unpackPhase = ''
    echo "from setuptools import setup; setup(name='${pname}', version='${version}', install_requires=['pycryptodome'])" > setup.py
  '';

  propagatedBuildInputs = [ pycryptodome ];

  # Our dummy has no tests
  doCheck = false;

  meta = {
    homepage = http://www.pycrypto.org/;
    description = "Python Cryptography Toolkit";
    platforms = pycryptodome.meta.platforms;
  };
}