Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.5 kB · 63 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364{ lib, stdenv, buildPythonPackage, fetchPypi, fetchurl, openssl, pytestCheckHook, pythonOlder, setuptools, swig,}:
buildPythonPackage rec { pname = "m2crypto"; version = "0.45.0"; pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi { inherit pname version; hash = "sha256-/8ENTQmQFRT0CNx09gpNffIcROvJv3dslHv9xzWUIc8="; }; patches = [ (fetchurl { url = "https://sources.debian.org/data/main/m/m2crypto/0.42.0-2.1/debian/patches/0004-swig-Workaround-for-reading-sys-select.h-ending-with.patch"; hash = "sha256-/Bkuqu/Od+S56AUWo0ZzpZF7FGMxP766K2GJnfKXrOI="; }) ];
build-system = [ setuptools ];
nativeBuildInputs = [ swig ];
buildInputs = [ openssl ];
env = { NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [ "-Wno-error=implicit-function-declaration" "-Wno-error=incompatible-pointer-types" ]); OPENSSL_PATH = lib.optionalString stdenv.hostPlatform.isDarwin "${openssl.dev}"; } // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { CPP = "${stdenv.cc.targetPrefix}cpp"; };
nativeCheckInputs = [ pytestCheckHook openssl ];
pythonImportsCheck = [ "M2Crypto" ];
meta = with lib; { description = "Python crypto and SSL toolkit"; homepage = "https://gitlab.com/m2crypto/m2crypto"; changelog = "https://gitlab.com/m2crypto/m2crypto/-/blob/${version}/CHANGES"; license = licenses.mit; maintainers = [ ]; };}