2019-12-11 13:31:22 +01:00
|
|
|
{ pkgs ? import <nixpkgs> {}
|
|
|
|
, lib ? pkgs.lib
|
|
|
|
, stdenv ? pkgs.stdenv
|
2019-06-27 16:44:42 +01:00
|
|
|
}:
|
2019-06-24 12:31:59 +01:00
|
|
|
|
2019-12-20 13:35:08 +00:00
|
|
|
self: super:
|
|
|
|
|
2019-12-11 13:31:22 +01:00
|
|
|
{
|
2020-03-27 23:12:59 +00:00
|
|
|
astroid = super.astroid.overridePythonAttrs (
|
2020-02-26 10:50:13 +01:00
|
|
|
old: rec {
|
2020-02-27 17:38:36 +00:00
|
|
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
2020-02-27 17:11:20 +01:00
|
|
|
doCheck = false;
|
2020-02-26 10:50:13 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
av = super.av.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
|
|
pkgs.pkgconfig
|
|
|
|
];
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.ffmpeg_4 ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
bcrypt = super.bcrypt.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.libffi ];
|
|
|
|
}
|
|
|
|
);
|
2020-01-09 14:07:36 +00:00
|
|
|
|
2020-01-18 20:29:07 +00:00
|
|
|
cffi =
|
|
|
|
# cffi is bundled with pypy
|
|
|
|
if self.python.implementation == "pypy" then null else (
|
2020-03-27 23:12:59 +00:00
|
|
|
super.cffi.overridePythonAttrs (
|
2020-01-18 20:29:07 +00:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.libffi ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
);
|
2019-12-11 13:31:22 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
cftime = super.cftime.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
self.cython
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2019-11-19 22:42:43 +00:00
|
|
|
|
2020-03-28 20:47:08 +01:00
|
|
|
configparser = super.configparser.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
self.toml
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
cryptography = super.cryptography.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.openssl ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
django = (
|
2020-03-27 23:12:59 +00:00
|
|
|
super.django.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
2020-01-12 22:18:49 +00:00
|
|
|
propagatedNativeBuildInputs = (old.propagatedNativeBuildInputs or [])
|
2019-12-11 13:31:22 +01:00
|
|
|
++ [ pkgs.gettext ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
django-bakery = super.django-bakery.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
configurePhase = ''
|
|
|
|
if ! test -e LICENSE; then
|
|
|
|
touch LICENSE
|
|
|
|
fi
|
2020-01-12 22:18:49 +00:00
|
|
|
'' + (old.configurePhase or "");
|
2019-12-11 13:31:22 +01:00
|
|
|
}
|
|
|
|
);
|
2019-06-27 16:44:42 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
dlib = super.dlib.overridePythonAttrs (
|
2020-01-17 11:00:36 +00:00
|
|
|
old: {
|
|
|
|
# Parallel building enabled
|
|
|
|
inherit (pkgs.python.pkgs.dlib) patches;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ pkgs.dlib.nativeBuildInputs;
|
|
|
|
buildInputs = old.buildInputs ++ pkgs.dlib.buildInputs;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2019-11-29 11:24:53 +01:00
|
|
|
# Environment markers are not always included (depending on how a dep was defined)
|
2019-12-20 13:35:08 +00:00
|
|
|
enum34 = if self.pythonAtLeast "3.4" then null else super.enum34;
|
2019-10-16 11:04:24 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
faker = super.faker.overridePythonAttrs (
|
2020-01-22 17:20:49 +00:00
|
|
|
old: {
|
2020-02-27 17:38:36 +00:00
|
|
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
2020-02-27 17:11:20 +01:00
|
|
|
doCheck = false;
|
2020-01-22 17:20:49 +00:00
|
|
|
}
|
|
|
|
);
|
2020-01-22 16:17:38 +00:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
fancycompleter = super.fancycompleter.overridePythonAttrs (
|
2020-02-26 18:55:41 +01:00
|
|
|
old: {
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'setup_requires="setupmeta"' 'setup_requires=[]' \
|
|
|
|
--replace 'versioning="devcommit"' 'version="${old.version}"'
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
fastparquet = super.fastparquet.overridePythonAttrs (
|
2020-03-26 17:28:29 -07:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
grandalf = super.grandalf.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
2020-02-27 17:38:36 +00:00
|
|
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
2020-02-27 17:11:20 +01:00
|
|
|
doCheck = false;
|
2019-12-11 13:31:22 +01:00
|
|
|
}
|
|
|
|
);
|
2019-06-22 22:42:29 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
h5py = super.h5py.overridePythonAttrs (
|
2020-02-26 10:50:13 +01:00
|
|
|
old: rec {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkgconfig ];
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.hdf5 self.pkgconfig self.cython ];
|
|
|
|
configure_flags = "--hdf5=${pkgs.hdf5}";
|
|
|
|
postConfigure = ''
|
|
|
|
${self.python.executable} setup.py configure ${configure_flags}
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
horovod = super.horovod.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.openmpi ];
|
|
|
|
}
|
|
|
|
);
|
2019-06-17 16:27:16 +01:00
|
|
|
|
2020-01-13 15:38:52 +00:00
|
|
|
# importlib-metadata has an incomplete dependency specification
|
2020-03-27 23:12:59 +00:00
|
|
|
importlib-metadata = super.importlib-metadata.overridePythonAttrs (
|
2020-01-13 15:38:52 +00:00
|
|
|
old: {
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ lib.optional self.python.isPy2 self.pathlib2;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
jupyter = super.jupyter.overridePythonAttrs (
|
2020-02-26 10:50:13 +01:00
|
|
|
old: rec {
|
|
|
|
# jupyter is a meta-package. Everything relevant comes from the
|
|
|
|
# dependencies. It does however have a jupyter.py file that conflicts
|
|
|
|
# with jupyter-core so this meta solves this conflict.
|
|
|
|
meta.priority = 100;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
lap = super.lap.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
|
|
self.numpy
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
llvmlite = super.llvmlite.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.llvm ];
|
|
|
|
|
|
|
|
# Disable static linking
|
|
|
|
# https://github.com/numba/llvmlite/issues/93
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ffi/Makefile.linux --replace "-static-libstdc++" ""
|
|
|
|
|
|
|
|
substituteInPlace llvmlite/tests/test_binding.py --replace "test_linux" "nope"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Set directory containing llvm-config binary
|
|
|
|
preConfigure = ''
|
|
|
|
export LLVM_CONFIG=${pkgs.llvm}/bin/llvm-config
|
|
|
|
'';
|
|
|
|
|
|
|
|
__impureHostDeps = pkgs.stdenv.lib.optionals pkgs.stdenv.isDarwin [ "/usr/lib/libm.dylib" ];
|
|
|
|
|
2019-12-10 10:21:22 +01:00
|
|
|
passthru = old.passthru // { llvm = pkgs.llvm; };
|
2019-12-11 13:31:22 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
lockfile = super.lockfile.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pbr ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
lxml = super.lxml.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = with pkgs; old.nativeBuildInputs ++ [ pkgconfig libxml2.dev libxslt.dev ];
|
|
|
|
buildInputs = with pkgs; old.buildInputs ++ [ libxml2 libxslt ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
markupsafe = super.markupsafe.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
src = old.src.override { pname = builtins.replaceStrings [ "markupsafe" ] [ "MarkupSafe" ] old.pname; };
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
matplotlib = super.matplotlib.overridePythonAttrs (
|
2020-03-14 23:13:51 +00:00
|
|
|
old:
|
|
|
|
let
|
|
|
|
enableGhostscript = old.passthru.enableGhostscript or false;
|
|
|
|
enableGtk3 = old.passthru.enableTk or false;
|
|
|
|
enableQt = old.passthru.enableQt or false;
|
|
|
|
enableTk = old.passthru.enableTk or false;
|
|
|
|
|
|
|
|
inherit (pkgs.darwin.apple_sdk.frameworks) Cocoa;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${pkgs.libcxx}/include/c++/v1";
|
|
|
|
|
|
|
|
XDG_RUNTIME_DIR = "/tmp";
|
|
|
|
|
|
|
|
buildInputs = old.buildInputs
|
|
|
|
++ lib.optional enableGhostscript pkgs.ghostscript
|
|
|
|
++ lib.optional stdenv.isDarwin [ Cocoa ];
|
|
|
|
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
|
|
pkgs.pkgconfig
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
|
|
pkgs.libpng
|
|
|
|
pkgs.freetype
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optionals enableGtk3 [ pkgs.cairo self.pycairo pkgs.gtk3 pkgs.gobject-introspection self.pygobject3 ]
|
|
|
|
++ stdenv.lib.optionals enableTk [ pkgs.tcl pkgs.tk self.tkinter pkgs.libX11 ]
|
|
|
|
++ stdenv.lib.optionals enableQt [ self.pyqt5 ]
|
|
|
|
;
|
|
|
|
|
|
|
|
inherit (super.matplotlib) patches;
|
|
|
|
}
|
2019-12-11 13:31:22 +01:00
|
|
|
);
|
|
|
|
|
2020-01-12 19:27:19 +00:00
|
|
|
# Calls Cargo at build time for source builds and is really tricky to package
|
|
|
|
maturin = super.maturin.override {
|
|
|
|
preferWheel = true;
|
|
|
|
};
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
mccabe = super.mccabe.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
2020-02-27 17:38:36 +00:00
|
|
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
2020-02-27 17:11:20 +01:00
|
|
|
doCheck = false;
|
2019-12-11 13:31:22 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
netcdf4 = super.netcdf4.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
self.cython
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
|
|
pkgs.zlib
|
|
|
|
pkgs.netcdf
|
|
|
|
pkgs.hdf5
|
|
|
|
pkgs.curl
|
|
|
|
pkgs.libjpeg
|
|
|
|
];
|
|
|
|
|
|
|
|
# Variables used to configure the build process
|
|
|
|
USE_NCCONFIG = "0";
|
|
|
|
HDF5_DIR = lib.getDev pkgs.hdf5;
|
|
|
|
NETCDF4_DIR = pkgs.netcdf;
|
|
|
|
CURL_DIR = pkgs.curl.dev;
|
|
|
|
JPEG_DIR = pkgs.libjpeg.dev;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
numpy = super.numpy.overridePythonAttrs (
|
2020-03-14 23:13:51 +00:00
|
|
|
old:
|
|
|
|
let
|
|
|
|
blas = old.passthru.args.blas or pkgs.openblasCompat;
|
|
|
|
blasImplementation = lib.nameFromURL blas.name "-";
|
|
|
|
cfg = pkgs.writeTextFile {
|
|
|
|
name = "site.cfg";
|
|
|
|
text = (
|
|
|
|
lib.generators.toINI {} {
|
|
|
|
${blasImplementation} = {
|
|
|
|
include_dirs = "${blas}/include";
|
|
|
|
library_dirs = "${blas}/lib";
|
|
|
|
} // lib.optionalAttrs (blasImplementation == "mkl") {
|
|
|
|
mkl_libs = "mkl_rt";
|
|
|
|
lapack_libs = "";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2019-11-29 11:24:53 +01:00
|
|
|
};
|
2020-03-14 23:13:51 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.gfortran ];
|
|
|
|
buildInputs = old.buildInputs ++ [ blas self.cython ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
preBuild = ''
|
|
|
|
ln -s ${cfg} site.cfg
|
|
|
|
'';
|
|
|
|
passthru = old.passthru // {
|
|
|
|
blas = blas;
|
|
|
|
inherit blasImplementation cfg;
|
|
|
|
};
|
|
|
|
}
|
2019-12-11 13:31:22 +01:00
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
openexr = super.openexr.overridePythonAttrs (
|
2020-02-26 10:50:13 +01:00
|
|
|
old: rec {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.openexr pkgs.ilmbase ];
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${pkgs.openexr.dev}/include/OpenEXR" "-I${pkgs.ilmbase.dev}/include/OpenEXR" ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-01-21 12:07:15 +00:00
|
|
|
peewee = super.peewee.overridePythonAttrs (
|
2020-03-14 23:13:51 +00:00
|
|
|
old:
|
|
|
|
let
|
|
|
|
withPostgres = old.passthru.withPostgres or false;
|
|
|
|
withMysql = old.passthru.withMysql or false;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
buildInputs = old.buildInputs ++ [ self.cython pkgs.sqlite ];
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs
|
|
|
|
++ lib.optional withPostgres self.psycopg2
|
|
|
|
++ lib.optional withMysql self.mysql-connector;
|
|
|
|
}
|
2020-01-21 12:07:15 +00:00
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pillow = super.pillow.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = [ pkgs.pkgconfig ] ++ old.nativeBuildInputs;
|
|
|
|
buildInputs = with pkgs; [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ] ++ old.buildInputs;
|
|
|
|
}
|
|
|
|
);
|
2019-11-29 11:24:53 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
psycopg2 = super.psycopg2.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ];
|
|
|
|
}
|
|
|
|
);
|
2019-11-28 02:24:33 +00:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
psycopg2-binary = super.psycopg2-binary.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.postgresql ];
|
|
|
|
}
|
|
|
|
);
|
2019-11-29 11:24:53 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pyarrow = super.pyarrow.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
self.cython
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2019-12-20 13:35:08 +00:00
|
|
|
pycairo = (
|
|
|
|
drv: (
|
|
|
|
drv.overridePythonAttrs (
|
|
|
|
_: {
|
|
|
|
format = "other";
|
|
|
|
}
|
|
|
|
)
|
2020-03-27 23:12:59 +00:00
|
|
|
).overridePythonAttrs (
|
2019-12-20 13:35:08 +00:00
|
|
|
old: {
|
2019-12-11 13:31:22 +01:00
|
|
|
|
2019-12-20 13:35:08 +00:00
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
|
|
pkgs.meson
|
|
|
|
pkgs.ninja
|
|
|
|
pkgs.pkgconfig
|
|
|
|
];
|
2019-12-11 13:31:22 +01:00
|
|
|
|
2019-12-20 13:35:08 +00:00
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
|
|
pkgs.cairo
|
|
|
|
pkgs.xlibsWrapper
|
|
|
|
];
|
2019-12-11 13:31:22 +01:00
|
|
|
|
2019-12-20 13:35:08 +00:00
|
|
|
mesonFlags = [ "-Dpython=${if self.isPy3k then "python3" else "python"}" ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
) super.pycairo;
|
2019-12-11 13:31:22 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pycocotools = super.pycocotools.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
self.cython
|
|
|
|
self.numpy
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pygobject = super.pygobject.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkgconfig ];
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.glib pkgs.gobject-introspection ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pylint = super.pylint.overridePythonAttrs (
|
2020-02-26 18:55:41 +01:00
|
|
|
old: {
|
2020-02-27 17:38:36 +00:00
|
|
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
2020-02-27 17:11:20 +01:00
|
|
|
doCheck = false;
|
2020-02-26 18:55:41 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pyopenssl = super.pyopenssl.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.openssl ];
|
|
|
|
}
|
|
|
|
);
|
2019-11-29 11:24:53 +01:00
|
|
|
|
2020-01-21 11:43:44 +00:00
|
|
|
pyqt5 = let
|
|
|
|
drv = super.pyqt5;
|
|
|
|
withConnectivity = drv.passthru.args.withConnectivity or false;
|
|
|
|
withMultimedia = drv.passthru.args.withMultimedia or false;
|
|
|
|
withWebKit = drv.passthru.args.withWebKit or false;
|
|
|
|
withWebSockets = drv.passthru.args.withWebSockets or false;
|
|
|
|
in
|
|
|
|
super.pyqt5.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
format = "other";
|
2020-01-13 00:24:05 +00:00
|
|
|
|
2020-01-21 11:43:44 +00:00
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
|
|
pkgs.pkgconfig
|
|
|
|
pkgs.qt5.qmake
|
|
|
|
pkgs.xorg.lndir
|
|
|
|
pkgs.qt5.qtbase
|
|
|
|
pkgs.qt5.qtsvg
|
|
|
|
pkgs.qt5.qtdeclarative
|
|
|
|
pkgs.qt5.qtwebchannel
|
|
|
|
# self.pyqt5-sip
|
|
|
|
self.sip
|
|
|
|
]
|
|
|
|
++ lib.optional withConnectivity pkgs.qt5.qtconnectivity
|
|
|
|
++ lib.optional withMultimedia pkgs.qt5.qtmultimedia
|
|
|
|
++ lib.optional withWebKit pkgs.qt5.qtwebkit
|
|
|
|
++ lib.optional withWebSockets pkgs.qt5.qtwebsockets
|
|
|
|
;
|
|
|
|
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
pkgs.dbus
|
|
|
|
pkgs.qt5.qtbase
|
|
|
|
pkgs.qt5.qtsvg
|
|
|
|
pkgs.qt5.qtdeclarative
|
|
|
|
self.sip
|
|
|
|
]
|
|
|
|
++ lib.optional withConnectivity pkgs.qt5.qtconnectivity
|
|
|
|
++ lib.optional withWebKit pkgs.qt5.qtwebkit
|
|
|
|
++ lib.optional withWebSockets pkgs.qt5.qtwebsockets
|
|
|
|
;
|
|
|
|
|
|
|
|
# Fix dbus mainloop
|
|
|
|
patches = pkgs.python3.pkgs.pyqt5.patches or [];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
|
|
|
|
|
|
|
export PYTHONPATH=$PYTHONPATH:$out/${self.python.sitePackages}
|
|
|
|
|
|
|
|
mkdir -p $out/${self.python.sitePackages}/dbus/mainloop
|
|
|
|
${self.python.executable} configure.py -w \
|
|
|
|
--confirm-license \
|
|
|
|
--no-qml-plugin \
|
|
|
|
--bindir=$out/bin \
|
|
|
|
--destdir=$out/${self.python.sitePackages} \
|
|
|
|
--stubsdir=$out/${self.python.sitePackages}/PyQt5 \
|
|
|
|
--sipdir=$out/share/sip/PyQt5 \
|
|
|
|
--designer-plugindir=$out/plugins/designer
|
|
|
|
|
|
|
|
runHook postConfigure
|
|
|
|
'';
|
2020-01-13 00:24:05 +00:00
|
|
|
|
2020-01-21 11:43:44 +00:00
|
|
|
postInstall = ''
|
|
|
|
ln -s ${self.pyqt5-sip}/${self.python.sitePackages}/PyQt5/sip.* $out/${self.python.sitePackages}/PyQt5/
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Let's make it a namespace package
|
|
|
|
cat << EOF > $out/${self.python.sitePackages}/PyQt5/__init__.py
|
|
|
|
from pkgutil import extend_path
|
|
|
|
__path__ = extend_path(__path__, __name__)
|
|
|
|
EOF
|
2020-01-13 00:24:05 +00:00
|
|
|
'';
|
|
|
|
|
2020-01-21 11:43:44 +00:00
|
|
|
installCheckPhase = let
|
|
|
|
modules = [
|
|
|
|
"PyQt5"
|
|
|
|
"PyQt5.QtCore"
|
|
|
|
"PyQt5.QtQml"
|
|
|
|
"PyQt5.QtWidgets"
|
|
|
|
"PyQt5.QtGui"
|
|
|
|
]
|
|
|
|
++ lib.optional withWebSockets "PyQt5.QtWebSockets"
|
|
|
|
++ lib.optional withWebKit "PyQt5.QtWebKit"
|
|
|
|
++ lib.optional withMultimedia "PyQt5.QtMultimedia"
|
|
|
|
++ lib.optional withConnectivity "PyQt5.QtConnectivity"
|
|
|
|
;
|
|
|
|
|
|
|
|
imports = lib.concatMapStrings (module: "import ${module};") modules;
|
|
|
|
in
|
|
|
|
''
|
|
|
|
echo "Checking whether modules can be imported..."
|
|
|
|
${self.python.interpreter} -c "${imports}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
2020-01-13 00:24:05 +00:00
|
|
|
|
2020-01-21 11:43:44 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
}
|
|
|
|
);
|
2020-01-13 00:24:05 +00:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pytest-datadir = super.pytest-datadir.overridePythonAttrs (
|
2020-01-12 20:29:23 +00:00
|
|
|
old: {
|
|
|
|
postInstall = ''
|
|
|
|
rm -f $out/LICENSE
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-02-27 17:44:17 +00:00
|
|
|
pytest = super.pytest.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
doCheck = false;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-02-27 17:38:36 +00:00
|
|
|
pytest-runner = super.pytest-runner or super.pytestrunner;
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
python-prctl = super.python-prctl.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
pkgs.libcap
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pyzmq = super.pyzmq.overridePythonAttrs (
|
2020-02-25 10:05:51 +00:00
|
|
|
old: {
|
2020-02-25 10:00:46 +00:00
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkgconfig ];
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.zeromq ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
rockset = super.rockset.overridePythonAttrs (
|
2020-02-26 10:50:13 +01:00
|
|
|
old: rec {
|
|
|
|
postPatch = ''
|
|
|
|
cp ./setup_rockset.py ./setup.py
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
scaleapi = super.scaleapi.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "install_requires = ['requests>=2.4.2', 'enum34']" "install_requires = ['requests>=2.4.2']" || true
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
pandas = super.pandas.overridePythonAttrs (
|
2020-02-24 18:49:12 +00:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ self.cython ];
|
|
|
|
}
|
|
|
|
);
|
2020-02-24 17:34:57 +00:00
|
|
|
|
2020-01-15 15:44:52 +00:00
|
|
|
# Pybind11 is an undeclared dependency of scipy that we need to pick from nixpkgs
|
|
|
|
# Make it not fail with infinite recursion
|
|
|
|
pybind11 = super.pybind11.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
cmakeFlags = (old.cmakeFlags or []) ++ [
|
|
|
|
"-DPYBIND11_TEST=off"
|
|
|
|
];
|
|
|
|
doCheck = false; # Circular test dependency
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
scipy = super.scipy.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.gfortran ];
|
2020-01-15 15:44:52 +00:00
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pybind11 ];
|
2019-12-11 13:31:22 +01:00
|
|
|
setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
buildInputs = old.buildInputs ++ [ self.numpy.blas ];
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py
|
|
|
|
export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
|
|
|
|
'';
|
|
|
|
preBuild = ''
|
|
|
|
ln -s ${self.numpy.cfg} site.cfg
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-01-15 15:44:52 +00:00
|
|
|
scikit-learn = super.scikit-learn.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [
|
|
|
|
pkgs.gfortran
|
|
|
|
pkgs.glibcLocales
|
|
|
|
] ++ lib.optionals stdenv.cc.isClang [
|
|
|
|
pkgs.llvmPackages.openmp
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
|
|
self.cython
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
shapely = super.shapely.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.geos self.cython ];
|
2020-01-17 18:18:40 +00:00
|
|
|
inherit (pkgs.python3.pkgs.shapely) patches GEOS_LIBRARY_PATH;
|
2019-12-11 13:31:22 +01:00
|
|
|
}
|
|
|
|
);
|
2019-11-28 16:21:27 +01:00
|
|
|
|
2020-02-28 20:21:52 +00:00
|
|
|
shellingham = if lib.versionAtLeast super.shellingham.version "1.3.2" then (
|
|
|
|
super.shellingham.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
format = "pyproject";
|
|
|
|
}
|
|
|
|
)
|
|
|
|
) else super.shellingham;
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
tables = super.tables.overridePythonAttrs (
|
2020-02-27 10:56:35 +01:00
|
|
|
old: {
|
|
|
|
HDF5_DIR = "${pkgs.hdf5}";
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkgconfig ];
|
|
|
|
propagatedBuildInputs = old.nativeBuildInputs ++ [ pkgs.hdf5 self.numpy self.numexpr ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
tensorpack = super.tensorpack.overridePythonAttrs (
|
2020-02-26 10:50:13 +01:00
|
|
|
old: {
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "# will call find_packages()" ""
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
urwidtrees = super.urwidtrees.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
old: {
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
|
|
self.urwid
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2019-11-28 16:21:27 +01:00
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
vose-alias-method = super.vose-alias-method.overridePythonAttrs (
|
2020-01-12 20:29:23 +00:00
|
|
|
old: {
|
|
|
|
postInstall = ''
|
|
|
|
rm -f $out/LICENSE
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-03-27 23:12:59 +00:00
|
|
|
uvloop = super.uvloop.overridePythonAttrs (
|
2020-01-23 13:21:13 +00:00
|
|
|
old: {
|
|
|
|
buildInputs = old.buildInputs ++ lib.optionals stdenv.isDarwin [
|
|
|
|
pkgs.darwin.apple_sdk.frameworks.ApplicationServices
|
|
|
|
pkgs.darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2020-01-10 12:53:46 +00:00
|
|
|
# Stop infinite recursion by using bootstrapped pkg from nixpkgs
|
2019-12-20 13:35:08 +00:00
|
|
|
wheel = (
|
|
|
|
pkgs.python3.pkgs.override {
|
|
|
|
python = self.python;
|
|
|
|
}
|
|
|
|
).wheel.overridePythonAttrs (
|
2019-12-11 13:31:22 +01:00
|
|
|
_: {
|
2019-12-20 13:35:08 +00:00
|
|
|
inherit (super.wheel) pname name version src;
|
2019-12-11 13:31:22 +01:00
|
|
|
}
|
|
|
|
);
|
2019-11-28 16:21:27 +01:00
|
|
|
|
2020-01-20 15:52:00 +00:00
|
|
|
zipp =
|
2020-03-26 19:07:17 +00:00
|
|
|
(
|
|
|
|
if lib.versionAtLeast super.zipp.version "2.0.0" then (
|
|
|
|
super.zipp.overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace setup.py --replace \
|
|
|
|
'setuptools.setup()' \
|
|
|
|
'setuptools.setup(version="${super.zipp.version}")'
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|
|
|
|
) else super.zipp
|
|
|
|
).overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
|
|
|
self.toml
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2020-01-20 15:52:00 +00:00
|
|
|
|
2019-06-17 16:27:16 +01:00
|
|
|
}
|