Merge branch 'master' into staging-next
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchpatch
|
||||
, docutils
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Pygments";
|
||||
version = "2.5.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2021-27291.patch";
|
||||
url = "https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14.patch";
|
||||
sha256 = "0ap7jgkmvkkzijabsgnfrwl376cjsxa4jmzvqysrkwpjq3q4rxpa";
|
||||
excludes = ["CHANGES"];
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ docutils ];
|
||||
|
||||
# Circular dependency with sphinx
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
homepage = "https://pygments.org/";
|
||||
description = "A generic syntax highlighter";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, botocore
|
||||
, jmespath
|
||||
, s3transfer
|
||||
, futures ? null
|
||||
, docutils
|
||||
, nose
|
||||
, mock
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "boto3";
|
||||
version = "1.17.97"; # N.B: if you change this, change botocore and awscli to a matching version
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0ab5afc51461c30f27aebef944211d16f47697b98ff8d2e2f6e49e59584853bb";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
|
||||
checkInputs = [ docutils nose mock ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
# This method is not in mock. It might have appeared in some versions.
|
||||
sed -i 's/action.assert_called_once()/self.assertEqual(action.call_count, 1)/' \
|
||||
tests/unit/resources/test_factory.py
|
||||
nosetests -d tests/unit --verbose
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
# Network access
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "boto3" ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/boto/boto3";
|
||||
license = lib.licenses.asl20;
|
||||
description = "AWS SDK for Python";
|
||||
longDescription = ''
|
||||
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
|
||||
Python, which allows Python developers to write software that makes use of
|
||||
services like Amazon S3 and Amazon EC2.
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python-dateutil
|
||||
, jmespath
|
||||
, docutils
|
||||
, simplejson
|
||||
, mock
|
||||
, nose
|
||||
, urllib3
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "botocore";
|
||||
version = "1.20.97"; # N.B: if you change this, change boto3 and awscli to a matching version
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "f7e119cf3e0f4a36100f0e983583afa91a84fb27c479a1716820aee4f2e190ab";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python-dateutil
|
||||
jmespath
|
||||
docutils
|
||||
simplejson
|
||||
urllib3
|
||||
];
|
||||
|
||||
checkInputs = [ mock nose ];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests -v
|
||||
'';
|
||||
|
||||
# Network access
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "botocore" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/boto/botocore";
|
||||
license = licenses.asl20;
|
||||
description = "A low-level interface to a growing number of Amazon Web Services";
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, python3
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python3.pkgs) certifi;
|
||||
|
||||
in buildPythonPackage rec {
|
||||
pname = "certifi";
|
||||
version = "2019.11.28";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
cp ${certifi.src}/certifi/cacert.pem certifi/cacert.pem
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "certifi" ];
|
||||
|
||||
# no tests implemented
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/certifi/python-certifi";
|
||||
description = "Python package for providing Mozilla's CA Bundle";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ ]; # NixOps team
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, fetchpatch
|
||||
, pytest, pytest-runner, hypothesis }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "chardet";
|
||||
version = "3.0.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add pytest 4 support. See: https://github.com/chardet/chardet/pull/174
|
||||
(fetchpatch {
|
||||
url = "https://github.com/chardet/chardet/commit/0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4.patch";
|
||||
sha256 = "1y1xhjf32rdhq9sfz58pghwv794f3w2f2qcn8p6hp4pc8jsdrn2q";
|
||||
})
|
||||
];
|
||||
|
||||
checkInputs = [ pytest pytest-runner hypothesis ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/chardet/chardet";
|
||||
description = "Universal encoding detector";
|
||||
license = licenses.lgpl2;
|
||||
maintainers = with maintainers; [ domenkozar ];
|
||||
};
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, pytz
|
||||
, gflags
|
||||
, python-dateutil
|
||||
, mox
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-apputils";
|
||||
version = "0.4.2";
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0afw0gxmh0yw5g7xsmw49gs8bbp0zyhbh6fr1b0h48f3a439v5a7";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
sed -i '/ez_setup/d' setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pytz gflags python-dateutil mox ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.executable} setup.py google_test
|
||||
'';
|
||||
|
||||
# ERROR:root:Trying to access flag test_tmpdir before flags were parsed.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Google Application Utilities for Python";
|
||||
homepage = "https://github.com/google/google-apputils";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pkg-config
|
||||
, gobject-introspection
|
||||
, pygobject3
|
||||
, gtk3
|
||||
, glib
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gtkme";
|
||||
version = "1.5.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-NIUgnbfcHjbPfsH3CF2Bywo8owrdsi1wqDoMxOa+2U4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config gobject-introspection gtk3 ];
|
||||
buildInputs = [ pygobject3 glib ];
|
||||
propagatedBuildInputs = [ gtk3 ];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"gtkme"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Manages an Application with Gtk windows, forms, lists and other complex items easily";
|
||||
homepage = "https://gitlab.com/doctormo/gtkme";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [
|
||||
revol-xut
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "idna";
|
||||
version = "2.10";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/kjd/idna/";
|
||||
description = "Internationalized Domain Names in Applications (IDNA)";
|
||||
license = lib.licenses.bsd3;
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, marisa, swig
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "marisa";
|
||||
version = "1.3.40";
|
||||
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "s-yata";
|
||||
repo = "marisa-trie";
|
||||
rev = "8dba9850b89d7828ebf33b8ab84df2b54d31260b";
|
||||
sha256 = "0pkp9fggk53lxlicfwrskgx33qplc4v6njbavlnz4x4z63zd4933";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ swig marisa ];
|
||||
buildInputs = [ marisa ];
|
||||
|
||||
sourceRoot = "${src.name}/bindings/python";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python binding for marisa package (do not confuse with marisa-trie python bindings)";
|
||||
homepage = "https://github.com/s-yata/marisa-trie";
|
||||
license = with licenses; [ bsd2 lgpl2 ];
|
||||
maintainers = with maintainers; [ vanzef ];
|
||||
};
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
{ buildPackages
|
||||
, lib
|
||||
, fetchpatch
|
||||
, python
|
||||
, buildPythonPackage
|
||||
, isPy37
|
||||
, protobuf
|
||||
, google-apputils ? null
|
||||
, six
|
||||
, pyext
|
||||
, isPy27
|
||||
, disabled
|
||||
, doCheck ? true
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
inherit (protobuf) pname src version;
|
||||
inherit disabled;
|
||||
doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2
|
||||
|
||||
propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ];
|
||||
propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc.
|
||||
nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ];
|
||||
buildInputs = [ protobuf ];
|
||||
|
||||
patches = lib.optional (isPy37 && (lib.versionOlder protobuf.version "3.6.1.2"))
|
||||
# Python 3.7 compatibility (not needed for protobuf >= 3.6.1.2)
|
||||
(fetchpatch {
|
||||
url = "https://github.com/protocolbuffers/protobuf/commit/0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7.patch";
|
||||
sha256 = "09hw22y3423v8bbmc9xm07znwdxfbya6rp78d4zqw6fisdvjkqf1";
|
||||
stripLen = 1;
|
||||
})
|
||||
;
|
||||
|
||||
prePatch = ''
|
||||
while [ ! -d python ]; do
|
||||
cd *
|
||||
done
|
||||
cd python
|
||||
'';
|
||||
|
||||
setupPyGlobalFlags = lib.optional (lib.versionAtLeast protobuf.version "2.6.0")
|
||||
"--cpp_implementation";
|
||||
|
||||
pythonImportsCheck = [
|
||||
"google.protobuf"
|
||||
] ++ lib.optionals (lib.versionAtLeast protobuf.version "2.6.0") [
|
||||
"google.protobuf.internal._api_implementation" # Verify that --cpp_implementation worked
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Protocol Buffers are Google's data interchange format";
|
||||
homepage = "https://developers.google.com/protocol-buffers/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ knedlsepp ];
|
||||
};
|
||||
|
||||
passthru.protobuf = protobuf;
|
||||
}
|
||||
@@ -1,33 +1,48 @@
|
||||
{ lib, stdenv, fetchurl, buildPythonPackage, pkg-config, glib, gobject-introspection,
|
||||
pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome }:
|
||||
{ lib, stdenv, fetchurl, fetchpatch, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pygobject";
|
||||
version = "3.36.1";
|
||||
|
||||
version = "2.28.7";
|
||||
format = "other";
|
||||
disabled = pythonAtLeast "3.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0b9CgC0c7BE7Wtqg579/N0W0RSHcIWNYjSdtXNYdcY8=";
|
||||
url = "mirror://gnome/sources/pygobject/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
outputs = [ "out" "devdoc" ];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dpython=python${if isPy3k then "3" else "2" }"
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
./pygobject-2.0-fix-darwin.patch
|
||||
(fetchpatch {
|
||||
url = "https://github.com/macports/macports-ports/raw/f2975d5bbbc2459c661905c5a850cc661fa32f55/python/py-gobject/files/py-gobject-dynamic_lookup-11.patch";
|
||||
sha256 = "sha256-mtlyu+La3+iC5iQAmVJzDA5E35XGaRQy/EKXzvrWRCg=";
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config meson ninja gobject-introspection ];
|
||||
buildInputs = [ glib gobject-introspection ]
|
||||
++ lib.optionals stdenv.isDarwin [ which ncurses ];
|
||||
propagatedBuildInputs = [ pycairo cairo ];
|
||||
configureFlags = [ "--disable-introspection" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glib ];
|
||||
|
||||
# in a "normal" setup, pygobject and pygtk are installed into the
|
||||
# same site-packages: we need a pth file for both. pygtk.py would be
|
||||
# used to select a specific version, in our setup it should have no
|
||||
# effect, but we leave it in case somebody expects and calls it.
|
||||
postInstall = lib.optionalString (!isPy3k) ''
|
||||
mv $out/${python.sitePackages}/{pygtk.pth,${pname}-${version}.pth}
|
||||
|
||||
# Prevent wrapping of codegen files as these are meant to be
|
||||
# executed by the python program
|
||||
chmod a-x $out/share/pygobject/*/codegen/*.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pygobject.readthedocs.io/";
|
||||
description = "Python bindings for Glib";
|
||||
description = "Python bindings for GLib";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
--- a/gio/unix-types.defs
|
||||
+++ b/gio/unix-types.defs
|
||||
@@ -7,18 +7,6 @@
|
||||
(gtype-id "G_TYPE_UNIX_CONNECTION")
|
||||
)
|
||||
|
||||
-(define-object DesktopAppInfo
|
||||
- (docstring
|
||||
- "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n"
|
||||
- "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n"
|
||||
- "based on desktop files."
|
||||
- )
|
||||
- (in-module "giounix")
|
||||
- (parent "GObject")
|
||||
- (c-name "GDesktopAppInfo")
|
||||
- (gtype-id "G_TYPE_DESKTOP_APP_INFO")
|
||||
-)
|
||||
-
|
||||
(define-object FDMessage
|
||||
(in-module "giounix")
|
||||
(parent "GSocketControlMessage")
|
||||
--- a/gio/unix.defs
|
||||
+++ b/gio/unix.defs
|
||||
@@ -32,54 +32,6 @@
|
||||
|
||||
|
||||
|
||||
-;; From gdesktopappinfo.h
|
||||
-
|
||||
-(define-function desktop_app_info_get_type
|
||||
- (c-name "g_desktop_app_info_get_type")
|
||||
- (return-type "GType")
|
||||
-)
|
||||
-
|
||||
-(define-function desktop_app_info_new_from_filename
|
||||
- (c-name "g_desktop_app_info_new_from_filename")
|
||||
- (return-type "GDesktopAppInfo*")
|
||||
- (parameters
|
||||
- '("const-char*" "filename")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-(define-function g_desktop_app_info_new_from_keyfile
|
||||
- (c-name "g_desktop_app_info_new_from_keyfile")
|
||||
- (return-type "GDesktopAppInfo*")
|
||||
- (parameters
|
||||
- '("GKeyFile*" "key_file")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-(define-function desktop_app_info_new
|
||||
- (c-name "g_desktop_app_info_new")
|
||||
- (is-constructor-of "GDesktopAppInfo")
|
||||
- (return-type "GDesktopAppInfo*")
|
||||
- (parameters
|
||||
- '("const-char*" "desktop_id")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-(define-method get_is_hidden
|
||||
- (of-object "GDesktopAppInfo")
|
||||
- (c-name "g_desktop_app_info_get_is_hidden")
|
||||
- (return-type "gboolean")
|
||||
-)
|
||||
-
|
||||
-(define-function desktop_app_info_set_desktop_env
|
||||
- (c-name "g_desktop_app_info_set_desktop_env")
|
||||
- (return-type "none")
|
||||
- (parameters
|
||||
- '("const-char*" "desktop_env")
|
||||
- )
|
||||
-)
|
||||
-
|
||||
-
|
||||
-
|
||||
;; From gunixfdmessage.h
|
||||
|
||||
(define-function g_unix_fd_message_get_type
|
||||
--- a/gio/unix.override
|
||||
+++ b/gio/unix.override
|
||||
@@ -24,7 +24,6 @@
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
#include <pygobject.h>
|
||||
#include <gio/gio.h>
|
||||
-#include <gio/gdesktopappinfo.h>
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include <gio/gunixmounts.h>
|
||||
#include <gio/gunixoutputstream.h>
|
||||
@@ -1,26 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi
|
||||
, docutils, pygments, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyroma";
|
||||
version = "2.6.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "2527423e3a24ccd56951f3ce1b0ebbcc4fa0518c82fca882e696c78726ab9c2f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "pygments < 2.6" "pygments"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ docutils pygments setuptools ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Test your project's packaging friendliness";
|
||||
homepage = "https://github.com/regebro/pyroma";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
{ lib, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pysqlite";
|
||||
version = "2.8.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "17d3335863e8cf8392eea71add33dab3f96d060666fe68ab7382469d307f4490";
|
||||
};
|
||||
|
||||
# Need to use the builtin sqlite3 on Python 3
|
||||
disabled = isPy3k;
|
||||
|
||||
# Since the `.egg' file is zipped, the `NEEDED' of the `.so' files
|
||||
# it contains is not taken into account. Thus, we must explicitly make
|
||||
# it a propagated input.
|
||||
propagatedBuildInputs = [ pkgs.sqlite ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace "setup.cfg" \
|
||||
--replace "/usr/local/include" "${pkgs.sqlite.dev}/include" \
|
||||
--replace "/usr/local/lib" "${pkgs.sqlite.out}/lib"
|
||||
${lib.optionalString (!stdenv.isDarwin) ''export LDSHARED="$CC -pthread -shared"''}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pysqlite.org/";
|
||||
description = "Python bindings for the SQLite embedded relational database engine";
|
||||
longDescription = ''
|
||||
pysqlite is a DB-API 2.0-compliant database interface for SQLite.
|
||||
|
||||
SQLite is a relational database management system contained in
|
||||
a relatively small C library. It is a public domain project
|
||||
created by D. Richard Hipp. Unlike the usual client-server
|
||||
paradigm, the SQLite engine is not a standalone process with
|
||||
which the program communicates, but is linked in and thus
|
||||
becomes an integral part of the program. The library
|
||||
implements most of SQL-92 standard, including transactions,
|
||||
triggers and most of complex queries.
|
||||
|
||||
pysqlite makes this powerful embedded SQL engine available to
|
||||
Python programmers. It stays compatible with the Python
|
||||
database API specification 2.0 as much as possible, but also
|
||||
exposes most of SQLite's native API, so that it is for example
|
||||
possible to create user-defined SQL functions and aggregates
|
||||
in Python.
|
||||
'';
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, setuptools-scm, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-runner";
|
||||
version = "5.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "96c7e73ead7b93e388c5d614770d2bae6526efd997757d3543fe17b557a0942b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm pytest ];
|
||||
|
||||
postPatch = ''
|
||||
rm pytest.ini
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
py.test tests
|
||||
'';
|
||||
|
||||
# Fixture not found
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Invoke py.test as distutils command with dependency resolution";
|
||||
homepage = "https://github.com/pytest-dev/pytest-runner";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{ lib
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, docutils
|
||||
, mock
|
||||
, nose
|
||||
, coverage
|
||||
, wheel
|
||||
, botocore
|
||||
, futures ? null
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "s3transfer";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-ywIvSxZVHt67sxo3fT8JYA262nNj2MXbeXbn9Hcy4bI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs =
|
||||
[
|
||||
botocore
|
||||
] ++ lib.optional (pythonOlder "3") futures;
|
||||
|
||||
buildInputs = [
|
||||
docutils
|
||||
mock
|
||||
nose
|
||||
coverage
|
||||
wheel
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
pushd s3transfer/tests
|
||||
nosetests -v unit/ functional/
|
||||
popd
|
||||
'';
|
||||
|
||||
# version on pypi has no tests/ dir
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/boto/s3transfer";
|
||||
license = licenses.asl20;
|
||||
description = "A library for managing Amazon S3 transfers";
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
diff --git a/scandir.py b/scandir.py
|
||||
index 3f602fb..40af3e5 100644
|
||||
--- a/scandir.py
|
||||
+++ b/scandir.py
|
||||
@@ -23,6 +23,7 @@ from os import listdir, lstat, stat, strerror
|
||||
from os.path import join, islink
|
||||
from stat import S_IFDIR, S_IFLNK, S_IFREG
|
||||
import collections
|
||||
+import platform
|
||||
import sys
|
||||
|
||||
try:
|
||||
@@ -432,6 +433,15 @@ elif sys.platform.startswith(('linux', 'darwin', 'sunos5')) or 'bsd' in sys.plat
|
||||
('__d_padding', ctypes.c_uint8 * 4),
|
||||
('d_name', ctypes.c_char * 256),
|
||||
)
|
||||
+ elif 'darwin' in sys.platform and 'arm64' in platform.machine():
|
||||
+ _fields_ = (
|
||||
+ ('d_ino', ctypes.c_uint64),
|
||||
+ ('d_off', ctypes.c_uint64),
|
||||
+ ('d_reclen', ctypes.c_uint16),
|
||||
+ ('d_namlen', ctypes.c_uint16),
|
||||
+ ('d_type', ctypes.c_uint8),
|
||||
+ ('d_name', ctypes.c_char * 1024),
|
||||
+ )
|
||||
else:
|
||||
_fields_ = (
|
||||
('d_ino', ctypes.c_uint32), # must be uint32, not ulong
|
||||
@@ -1,24 +0,0 @@
|
||||
{ lib, python, buildPythonPackage, fetchPypi }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "scandir";
|
||||
version = "1.10.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./add-aarch64-darwin-dirent.patch
|
||||
];
|
||||
|
||||
checkPhase = "${python.interpreter} test/run_tests.py";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A better directory iterator and faster os.walk()";
|
||||
homepage = "https://github.com/benhoyt/scandir";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytest
|
||||
, simplejson
|
||||
, mock
|
||||
, glibcLocales
|
||||
, html5lib
|
||||
, pythonOlder
|
||||
, enum34
|
||||
, python
|
||||
, docutils
|
||||
, jinja2
|
||||
, pygments
|
||||
, alabaster
|
||||
, babel
|
||||
, snowballstemmer
|
||||
, six
|
||||
, sqlalchemy
|
||||
, whoosh
|
||||
, imagesize
|
||||
, requests
|
||||
, typing
|
||||
, sphinxcontrib-websupport
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sphinx";
|
||||
version = "1.8.5";
|
||||
src = fetchPypi {
|
||||
pname = "Sphinx";
|
||||
inherit version;
|
||||
sha256 = "c7658aab75c920288a8cf6f09f244c6cfdae30d82d803ac1634d9f223a80ca08";
|
||||
};
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
|
||||
# Disable two tests that require network access.
|
||||
checkPhase = ''
|
||||
cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
docutils
|
||||
jinja2
|
||||
pygments
|
||||
alabaster
|
||||
babel
|
||||
setuptools
|
||||
snowballstemmer
|
||||
six
|
||||
sphinxcontrib-websupport
|
||||
sqlalchemy
|
||||
whoosh
|
||||
imagesize
|
||||
requests
|
||||
] ++ lib.optional (pythonOlder "3.5") typing;
|
||||
|
||||
# Lots of tests. Needs network as well at some point.
|
||||
doCheck = false;
|
||||
|
||||
patches = [
|
||||
# Since pygments 2.5, PythonLexer refers to python3. If we want to use
|
||||
# python2, we need to explicitly specify Python2Lexer.
|
||||
# Not upstreamed since there doesn't seem to be any upstream maintenance
|
||||
# branch for 1.8 (and this patch doesn't make any sense for 2.x).
|
||||
./python2-lexer.patch
|
||||
];
|
||||
# https://github.com/NixOS/nixpkgs/issues/22501
|
||||
# Do not run `python sphinx-build arguments` but `sphinx-build arguments`.
|
||||
postPatch = ''
|
||||
substituteInPlace sphinx/make_mode.py --replace "sys.executable, " ""
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects";
|
||||
homepage = "http://sphinx.pocoo.org/";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
|
||||
index ac2bd1b06..63ca52de2 100644
|
||||
--- a/sphinx/highlighting.py
|
||||
+++ b/sphinx/highlighting.py
|
||||
@@ -16,7 +16,7 @@ from pygments.filters import ErrorToken
|
||||
from pygments.formatters import HtmlFormatter, LatexFormatter
|
||||
from pygments.lexer import Lexer # NOQA
|
||||
from pygments.lexers import get_lexer_by_name, guess_lexer
|
||||
-from pygments.lexers import PythonLexer, Python3Lexer, PythonConsoleLexer, \
|
||||
+from pygments.lexers import Python2Lexer, Python3Lexer, PythonConsoleLexer, \
|
||||
CLexer, TextLexer, RstLexer
|
||||
from pygments.styles import get_style_by_name
|
||||
from pygments.util import ClassNotFound
|
||||
@@ -40,7 +40,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
lexers = dict(
|
||||
none = TextLexer(stripnl=False),
|
||||
- python = PythonLexer(stripnl=False),
|
||||
+ python = Python2Lexer(stripnl=False),
|
||||
python3 = Python3Lexer(stripnl=False),
|
||||
pycon = PythonConsoleLexer(stripnl=False),
|
||||
pycon3 = PythonConsoleLexer(python3=True, stripnl=False),
|
||||
@@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sphinxcontrib-websupport";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1501befb0fdf1d1c29a800fdbf4ef5dc5369377300ddbdd16d2cd40e54c6eefc";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Sphinx API for Web Apps";
|
||||
homepage = "http://sphinx-doc.org/";
|
||||
license = lib.licenses.bsd2;
|
||||
};
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, unittestCheckHook
|
||||
, pythonAtLeast }:
|
||||
|
||||
let
|
||||
testDir = if isPy3k then "src" else "python2";
|
||||
|
||||
in buildPythonPackage rec {
|
||||
pname = "typing";
|
||||
version = "3.10.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "13b4ad211f54ddbf93e5901a9967b1e07720c1d1b78d596ac6a439641aa1b130";
|
||||
};
|
||||
|
||||
disabled = pythonAtLeast "3.5";
|
||||
|
||||
# Error for Python3.6: ImportError: cannot import name 'ann_module'
|
||||
# See https://github.com/python/typing/pull/280
|
||||
# Also, don't bother on PyPy: AssertionError: TypeError not raised
|
||||
doCheck = pythonOlder "3.6" && !isPyPy;
|
||||
|
||||
checkInputs = [ unittestCheckHook ];
|
||||
|
||||
unittestFlagsArray = [ "-s" testDir ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Backport of typing module to Python versions older than 3.5";
|
||||
homepage = "https://docs.python.org/3/library/typing.html";
|
||||
license = licenses.psfl;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user