python-packages: separate specific-versions pkgs
This simplifies maintenance.
This commit is contained in:
parent
bfe8ac972c
commit
721ba1aeba
5 changed files with 12 additions and 8 deletions
|
|
@ -0,0 +1,83 @@
|
|||
# Copied from nixpkgs rev c7d0dbe094c988209edac801eb2a0cc21aa498d8
|
||||
|
||||
{ lib, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchpatch
|
||||
, isPy27
|
||||
, ipaddress
|
||||
, openssl
|
||||
, cryptography_vectors
|
||||
, darwin
|
||||
, packaging
|
||||
, six
|
||||
, pythonOlder
|
||||
, isPyPy
|
||||
, cffi
|
||||
, pytest
|
||||
, pretend
|
||||
, iso8601
|
||||
, pytz
|
||||
, hypothesis
|
||||
, enum34
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cryptography";
|
||||
version = "3.3.2"; # Also update the hash in vectors.nix
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1vcvw4lkw1spiq322pm1256kail8nck6bbgpdxx3pqa905wd6q2s";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = lib.optionals (!isPyPy) [
|
||||
cffi
|
||||
];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
|
||||
propagatedBuildInputs = [
|
||||
packaging
|
||||
six
|
||||
] ++ lib.optionals (!isPyPy) [
|
||||
cffi
|
||||
] ++ lib.optionals isPy27 [
|
||||
ipaddress enum34
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
cryptography_vectors
|
||||
hypothesis
|
||||
iso8601
|
||||
pretend
|
||||
pytest
|
||||
pytz
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
py.test --disable-pytest-warnings tests
|
||||
'';
|
||||
|
||||
# IOKit's dependencies are inconsistent between OSX versions, so this is the best we
|
||||
# can do until nix 1.11's release
|
||||
__impureHostDeps = [ "/usr/lib" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A package which provides cryptographic recipes and primitives";
|
||||
longDescription = ''
|
||||
Cryptography includes both high level recipes and low level interfaces to
|
||||
common cryptographic algorithms such as symmetric ciphers, message
|
||||
digests, and key derivation functions.
|
||||
Our goal is for it to be your "cryptographic standard library". It
|
||||
supports Python 2.7, Python 3.5+, and PyPy 5.4+.
|
||||
'';
|
||||
homepage = "https://github.com/pyca/cryptography";
|
||||
changelog = "https://cryptography.io/en/latest/changelog/#v"
|
||||
+ replaceStrings [ "." ] [ "-" ] version;
|
||||
license = with licenses; [ asl20 bsd3 psfl ];
|
||||
maintainers = with maintainers; [ primeos ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# Copied from nixpkgs rev c7d0dbe094c988209edac801eb2a0cc21aa498d8
|
||||
|
||||
{ buildPythonPackage, fetchPypi, lib, cryptography }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cryptography_vectors";
|
||||
# The test vectors must have the same version as the cryptography package:
|
||||
version = cryptography.version;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc";
|
||||
};
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Test vectors for the cryptography package";
|
||||
homepage = "https://cryptography.io/en/latest/development/test-vectors/";
|
||||
# Source: https://github.com/pyca/cryptography/tree/master/vectors;
|
||||
license = with licenses; [ asl20 bsd3 ];
|
||||
maintainers = with maintainers; [ primeos ];
|
||||
};
|
||||
}
|
||||
12
pkgs/python-packages/specific-versions/recommonmark.nix
Normal file
12
pkgs/python-packages/specific-versions/recommonmark.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ recommonmark, fetchFromGitHub }:
|
||||
|
||||
recommonmark.overridePythonAttrs (old: rec {
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rtfd";
|
||||
repo = old.pname;
|
||||
rev = version;
|
||||
sha256 = "0kwm4smxbgq0c0ybkxfvlgrfb3gq9amdw94141jyykk9mmz38379";
|
||||
};
|
||||
})
|
||||
62
pkgs/python-packages/specific-versions/twisted.nix
Normal file
62
pkgs/python-packages/specific-versions/twisted.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python
|
||||
, zope_interface
|
||||
, incremental
|
||||
, automat
|
||||
, constantly
|
||||
, hyperlink
|
||||
, pyhamcrest
|
||||
, attrs
|
||||
, pyopenssl
|
||||
, service-identity
|
||||
, setuptools
|
||||
, idna
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "Twisted";
|
||||
version = "20.3.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "tar.bz2";
|
||||
sha256 = "040yzha6cyshnn6ljgk2birgh6mh2cnra48xp5ina5vfsnsmab6p";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools ];
|
||||
|
||||
passthru.extras.tls = [ pyopenssl service-identity idna ];
|
||||
|
||||
# Patch t.p._inotify to point to libc. Without this,
|
||||
# twisted.python.runtime.platform.supportsINotify() == False
|
||||
patchPhase = lib.optionalString stdenv.isLinux ''
|
||||
substituteInPlace src/twisted/python/_inotify.py --replace \
|
||||
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
|
||||
'';
|
||||
|
||||
# Generate Twisted's plug-in cache. Twisted users must do it as well. See
|
||||
# http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
|
||||
# and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
|
||||
# details.
|
||||
postFixup = ''
|
||||
$out/bin/twistd --help > /dev/null
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest discover -s twisted/test
|
||||
'';
|
||||
# Tests require network
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://twistedmatrix.com/";
|
||||
description = "Twisted, an event-driven networking engine written in Python";
|
||||
longDescription = ''
|
||||
Twisted is an event-driven networking engine written in Python
|
||||
and licensed under the MIT license.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue