1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pycryptodome
6, unittestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "sjcl";
11 version = "0.2.1";
12
13 format = "setuptools";
14
15 # PyPi release is missing tests
16 src = fetchFromGitHub {
17 owner = "berlincode";
18 repo = pname;
19 # commit from: 2018-08-16, because there aren't any tags on git
20 rev = "e8bdad312fa99c89c74f8651a1240afba8a9f3bd";
21 sha256 = "1v8rc55v28v8cl7nxcavj34am005wi63zcvwnbc6pyfbv4ss30ab";
22 };
23
24 propagatedBuildInputs = [ pycryptodome ];
25
26 checkInputs = [ unittestCheckHook ];
27
28 pythonImportsCheck = [
29 "sjcl"
30 ];
31
32 meta = with lib; {
33 description = "Decrypt and encrypt messages compatible to the \"Stanford Javascript Crypto Library (SJCL)\" message format. This is a wrapper around pycrypto.";
34 homepage = "https://github.com/berlincode/sjcl";
35 license = licenses.bsd3;
36 maintainers = with maintainers; [ binsky ];
37 };
38}