nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 42 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, pycryptodome 6, python 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 checkPhase = '' 27 runHook preCheck 28 ${python.interpreter} -m unittest discover 29 runHook postCheck 30 ''; 31 32 pythonImportsCheck = [ 33 "sjcl" 34 ]; 35 36 meta = with lib; { 37 description = "Decrypt and encrypt messages compatible to the \"Stanford Javascript Crypto Library (SJCL)\" message format. This is a wrapper around pycrypto."; 38 homepage = "https://github.com/berlincode/sjcl"; 39 license = licenses.bsd3; 40 maintainers = with maintainers; [ binsky ]; 41 }; 42}