Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-01-24 01:18:54 +00:00 committed by GitHub
commit 1b9433b0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
234 changed files with 707 additions and 765 deletions

View File

@ -1,6 +1,7 @@
{ lib
, buildPythonApplication
, fetchPypi
, makeDesktopItem
, makePythonPath
, dateutil
, matplotlib
@ -38,6 +39,23 @@ buildPythonApplication rec {
doCheck = false; # it fails miserably with a core dump
desktopItem = makeDesktopItem rec {
name = pname;
exec = name;
icon = name;
desktopName = "Pyspread";
genericName = "Spreadsheet";
comment = meta.description;
categories = "Office;Development;Spreadsheet;";
};
postInstall = ''
runHook preInstall
install -D $out/share/applications
install -m 644 $desktopItem/share/applications/* $out/share/applications
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" $out/bin/pyspread

View File

@ -13,11 +13,11 @@ let
in
stdenv.mkDerivation rec {
pname = "gitkraken";
version = "7.4.1";
version = "7.5.0";
src = fetchzip {
url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz";
sha256 = "1c9cyxx5sqvnilf6xp3ildq3lwl6mj8v1vl0wzyjpaiqky99lj9p";
sha256 = "1v89aza7iwph7k5phyld5m5856c5wbh8ncgg6lh7558v4xna0x57";
};
dontBuild = true;
@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
];
desktopItem = makeDesktopItem {
name = "gitkraken";
name = pname;
exec = "gitkraken";
icon = "gitkraken";
desktopName = "GitKraken";
@ -88,10 +88,7 @@ stdenv.mkDerivation rec {
ln -s $out/share/gitkraken/gitkraken $out/bin/gitkraken
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications/
substituteInPlace $out/share/applications/gitkraken.desktop \
--replace $out/usr/share/gitkraken $out/bin
ln -s ${desktopItem}/share/applications/* $out/share/applications
mkdir -p $out/share/pixmaps
cp gitkraken.png $out/share/pixmaps/gitkraken.png

View File

@ -24,19 +24,13 @@ with lib;
stdenv.mkDerivation rec {
pname = "${optionalString onlyLibVLC "lib"}vlc";
version = "3.0.11.1";
version = "3.0.12";
src = fetchurl {
url = "http://get.videolan.org/vlc/${version}/vlc-${version}.tar.xz";
sha256 = "1f46h0hv7fk35zg4iczlp7ib7h2jmh8m4r5klw3g2558ib9134qq";
sha256 = "0ygqihw2c5vvzv8950dlf7rdwz1cpz1668jgyja604ljibrmix7g";
};
patches = [
# Couldn't find an upstream version of this patch
# https://build.opensuse.org/package/view_file/openSUSE:Factory/vlc/fix-missing-includes-with-qt-5.15.patch?expand=1
./fix-missing-includes-with-qt-5.15.patch
];
# VLC uses a *ton* of libraries for various pieces of functionality, many of
# which are not included here for no other reason that nobody has mentioned
# needing them
@ -67,9 +61,6 @@ stdenv.mkDerivation rec {
BUILDCC = "${stdenv.cc}/bin/gcc";
postPatch = ''
substituteInPlace configure \
--replace /bin/echo echo
substituteInPlace modules/text_renderer/freetype/platform_fonts.h --replace \
/usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype
'';

View File

@ -1,37 +0,0 @@
Index: vlc-3.0.8/modules/gui/qt/util/timetooltip.hpp
===================================================================
--- vlc-3.0.8.orig/modules/gui/qt/util/timetooltip.hpp
+++ vlc-3.0.8/modules/gui/qt/util/timetooltip.hpp
@@ -25,6 +25,7 @@
#include "qt.hpp"
#include <QWidget>
+#include <QPainterPath>
class TimeTooltip : public QWidget
{
Index: vlc-3.0.8/modules/gui/qt/components/playlist/views.cpp
===================================================================
--- vlc-3.0.8.orig/modules/gui/qt/components/playlist/views.cpp
+++ vlc-3.0.8/modules/gui/qt/components/playlist/views.cpp
@@ -27,6 +27,7 @@
#include "input_manager.hpp" /* THEMIM */
#include <QPainter>
+#include <QPainterPath>
#include <QRect>
#include <QStyleOptionViewItem>
#include <QFontMetrics>
Index: vlc-3.0.8/modules/gui/qt/dialogs/plugins.cpp
===================================================================
--- vlc-3.0.8.orig/modules/gui/qt/dialogs/plugins.cpp
+++ vlc-3.0.8/modules/gui/qt/dialogs/plugins.cpp
@@ -53,6 +53,7 @@
#include <QListView>
#include <QListWidget>
#include <QPainter>
+#include <QPainterPath>
#include <QStyleOptionViewItem>
#include <QKeyEvent>
#include <QPushButton>

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -1,4 +1,5 @@
{ lib, stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetch
, cmake
, llvm

View File

@ -17,10 +17,14 @@ stdenv.mkDerivation {
substituteInPlace Makefile --replace "SED_INPLACE=sed -i '''" "SED_INPLACE=sed -i"
'';
buildFlags = lib.optionals stdenv.hostPlatform.isStatic [ "static" ];
preCheck = "patchShebangs runtests";
doCheck = true;
checkTarget = "test";
installTargets = lib.optionals stdenv.hostPlatform.isStatic [ "static-install" ];
doInstallCheck = true;
installCheckTarget = "testinstall";

View File

@ -16,12 +16,12 @@ let
++ [ "reimport_from_subinterpreter" ]
# cython's testsuite is not working very well with libc++
# We are however optimistic about things outside of testsuite still working
++ stdenv.lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ]
++ lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ]
# Some tests in the test suite isn't working on aarch64. Disable them for
# now until upstream finds a workaround.
# Upstream issue here: https://github.com/cython/cython/issues/2308
++ stdenv.lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ]
++ stdenv.lib.optionals stdenv.isi686 [ "future_division" "overflow_check_longlong" ]
++ lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ]
++ lib.optionals stdenv.isi686 [ "future_division" "overflow_check_longlong" ]
;
in buildPythonPackage rec {
@ -55,7 +55,7 @@ in buildPythonPackage rec {
export HOME="$NIX_BUILD_TOP"
${python.interpreter} runtests.py -j$NIX_BUILD_CORES \
--no-code-style \
${stdenv.lib.optionalString (builtins.length excludedTests != 0)
${lib.optionalString (builtins.length excludedTests != 0)
''--exclude="(${builtins.concatStringsSep "|" excludedTests})"''}
'';

View File

@ -13,9 +13,9 @@ buildPythonPackage rec {
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [ numpy pysam matplotlib ];
checkPhase = stdenv.lib.optionalString isPy27 ''
checkPhase = lib.optionalString isPy27 ''
${python.interpreter} python2/test/test_general.py
'' + stdenv.lib.optionalString isPy3k ''
'' + lib.optionalString isPy3k ''
${python.interpreter} python3/test/test_general.py
'';

View File

@ -40,8 +40,8 @@ let
if stdenv.cc.isClang then "clang++" else
throw "Unknown C++ compiler";
cxx_compiler = wrapped cxx_compiler_name "\\$HOME/.theano"
( stdenv.lib.optional cudaSupport libgpuarray_
++ stdenv.lib.optional cudnnSupport cudnn );
( lib.optional cudaSupport libgpuarray_
++ lib.optional cudnnSupport cudnn );
libgpuarray_ = libgpuarray.override { inherit cudaSupport cudatoolkit; };
@ -60,10 +60,10 @@ in buildPythonPackage rec {
substituteInPlace theano/configdefaults.py \
--replace 'StrParam(param, is_valid=warn_cxx)' 'StrParam('\'''${cxx_compiler}'\''', is_valid=warn_cxx)' \
--replace 'rc == 0 and config.cxx != ""' 'config.cxx != ""'
'' + stdenv.lib.optionalString cudaSupport ''
'' + lib.optionalString cudaSupport ''
substituteInPlace theano/configdefaults.py \
--replace 'StrParam(get_cuda_root)' 'StrParam('\'''${cudatoolkit}'\''')'
'' + stdenv.lib.optionalString cudnnSupport ''
'' + lib.optionalString cudnnSupport ''
substituteInPlace theano/configdefaults.py \
--replace 'StrParam(default_dnn_base_path)' 'StrParam('\'''${cudnn}'\''')'
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }:
{ lib, stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }:
buildPythonPackage rec {
pname = "aenum";
@ -22,10 +22,10 @@ buildPythonPackage rec {
runHook postCheck
'';
meta = {
meta = with lib; {
description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";
maintainers = with stdenv.lib.maintainers; [ vrthra ];
license = with stdenv.lib.licenses; [ bsd3 ];
maintainers = with maintainers; [ vrthra ];
license = licenses.bsd3;
homepage = "https://github.com/ethanfurman/aenum";
};
}

View File

@ -10,9 +10,9 @@ buildPythonPackage rec {
sha256 = "815fdef4607474295d68da46978a54481dd1e7be153c7d60f9e72773cd38d77d";
};
propagatedBuildInputs = with stdenv.lib; [ pycares ]
++ optional (pythonOlder "3.7") typing
++ optional (isPy27 || isPyPy) trollius;
propagatedBuildInputs = [ pycares ]
++ lib.optional (pythonOlder "3.7") typing
++ lib.optional (isPy27 || isPyPy) trollius;
checkPhase = ''
${python.interpreter} tests.py

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
async-timeout
] ++ stdenv.lib.optional (!isPyPy) hiredis;
] ++ lib.optional (!isPyPy) hiredis;
# Wants to run redis-server, hardcoded FHS paths, too much trouble.
doCheck = false;

View File

@ -33,7 +33,7 @@ buildPythonPackage rec {
pandas
six
toolz
] ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
] ++ lib.optionals (pythonOlder "3.5") [ typing ];
checkInputs = [
glibcLocales

View File

@ -13,7 +13,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ dateutil ];
checkInputs = stdenv.lib.optional (!isPy3k) mock;
checkInputs = lib.optional (!isPy3k) mock;
src = fetchPypi {
inherit pname version;

View File

@ -22,13 +22,13 @@ buildPythonPackage rec {
# Failing tests on Python 3
# https://github.com/pytest-dev/apipkg/issues/17
checkPhase = let
disabledTests = stdenv.lib.optionals isPy3k [
disabledTests = lib.optionals isPy3k [
"test_error_loading_one_element"
"test_aliasmodule_proxy_methods"
"test_eagerload_on_bython"
];
testExpression = stdenv.lib.optionalString (disabledTests != [])
"-k 'not ${stdenv.lib.concatStringsSep " and not " disabledTests}'";
testExpression = lib.optionalString (disabledTests != [])
"-k 'not ${lib.concatStringsSep " and not " disabledTests}'";
in ''
py.test ${testExpression}
'';

View File

@ -12,7 +12,7 @@ buildPythonPackage rec {
patchPhase = ''
# this test requires network access
sed -i 's/test_server_with_path/noop/' avro/test/test_ipc.py
'' + (stdenv.lib.optionalString isPy3k ''
'' + (lib.optionalString isPy3k ''
# these files require twisted, which is not python3 compatible
rm avro/txipc.py
rm avro/test/txsample*

View File

@ -1,8 +1,6 @@
{ stdenv, buildPythonPackage, isPyPy, fetchPypi, pythonOlder
{ lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, pythonOlder
, cffi, pycparser, mock, pytest, py, six }:
with stdenv.lib;
buildPythonPackage rec {
version = "3.2.0";
pname = "bcrypt";
@ -12,10 +10,12 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29";
};
buildInputs = [ pycparser mock pytest py ];
propagatedBuildInputs = [ six ] ++ optional (!isPyPy) cffi;
meta = {
buildInputs = [ pycparser mock pytest py ];
propagatedBuildInputs = [ six ] ++ lib.optional (!isPyPy) cffi;
meta = with lib; {
maintainers = with maintainers; [ domenkozar ];
description = "Modern password hashing for your software and your servers";
license = licenses.asl20;

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k
, beautifulsoup4, bottle, chardet, dateutil
, google_api_python_client, lxml, oauth2client
, ply, python_magic, pytest, requests }:
@ -33,7 +33,7 @@ buildPythonPackage rec {
pytest
];
meta = {
meta = with lib; {
homepage = "http://furius.ca/beancount/";
description = "Double-entry bookkeeping computer language";
longDescription = ''
@ -41,8 +41,8 @@ buildPythonPackage rec {
financial transaction records in a text file, read them in memory,
generate a variety of reports from them, and provides a web interface.
'';
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ ];
license = licenses.gpl2;
maintainers = with maintainers; [ ];
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, buildPythonPackage }:
{ lib, stdenv, fetchFromGitHub, buildPythonPackage }:
buildPythonPackage rec {
pname = "beanstalkc";
@ -13,10 +13,10 @@ buildPythonPackage rec {
doCheck = false;
meta = {
meta = with lib; {
description = "A simple beanstalkd client library for Python";
maintainers = with stdenv.lib.maintainers; [ aanderse ];
license = with stdenv.lib.licenses; [ asl20 ];
maintainers = with maintainers; [ aanderse ];
license = licenses.asl20;
homepage = "https://github.com/earl/beanstalkc";
};
}

View File

@ -25,7 +25,7 @@ buildPythonPackage rec {
buildInputs = [ btrfs-progs ];
propagatedBuildInputs = [ contextlib2 pyxdg pycparser alembic ]
++ stdenv.lib.optionals (!isPyPy) [ cffi ];
++ lib.optionals (!isPyPy) [ cffi ];
meta = with lib; {
description = "Deduplication for Btrfs";

View File

@ -26,7 +26,7 @@ buildPythonApplication rec {
# timing-based test flaky on Darwin
# https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824
disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ];
disabledTests = lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ];
postCheck = ''
export LANG="en_US.UTF-8"

View File

@ -35,7 +35,7 @@ buildPythonPackage {
};
propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs sasquatch squashfsTools lzma pycrypto ]
++ stdenv.lib.optionals visualizationSupport [ matplotlib pyqtgraph ];
++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ];
# setup.py only installs version.py during install, not test
postPatch = ''

View File

@ -1,4 +1,4 @@
{ stdenv, python, fetchPypi, makeWrapper, unzip, makeSetupHook
{ lib, stdenv, python, fetchPypi, makeWrapper, unzip, makeSetupHook
, pipInstallHook
, setuptoolsBuildHook
, wheel, pip, setuptools
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
buildPhase = ":";
installPhase = stdenv.lib.strings.optionalString (!stdenv.hostPlatform.isWindows) ''
installPhase = lib.strings.optionalString (!stdenv.hostPlatform.isWindows) ''
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
'' + ''
# Give folders a known name
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Version of pip used for bootstrapping";
license = stdenv.lib.unique (pip.meta.license ++ setuptools.meta.license ++ wheel.meta.license);
license = lib.unique (pip.meta.license ++ setuptools.meta.license ++ wheel.meta.license);
homepage = pip.meta.homepage;
};
}

View File

@ -1,4 +1,4 @@
{ fetchPypi, stdenv, buildPythonPackage }:
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "zc.buildout";
@ -13,10 +13,10 @@ buildPythonPackage rec {
postInstall = "mv $out/bin/buildout{,-nix}";
meta = {
meta = with lib; {
homepage = "http://www.buildout.org";
description = "A software build and configuration system";
license = stdenv.lib.licenses.zpl21;
maintainers = [ stdenv.lib.maintainers.goibhniu ];
license = licenses.zpl21;
maintainers = [ maintainers.goibhniu ];
};
}

View File

@ -48,7 +48,7 @@ let
libGL
libGLU
libX11
] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ];
] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
propagatedBuildInputs = [
six

View File

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "capstone";
version = stdenv.lib.getVersion capstone;
version = lib.getVersion capstone;
src = capstone.src;
sourceRoot = "${capstone.name}/bindings/python";

View File

@ -9,7 +9,7 @@ buildPythonPackage rec {
version = "1.4";
disabled = isPy3k;
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.IOKit ];
buildInputs = lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.IOKit ];
src = pkgs.fetchurl {
url = "http://cddb-py.sourceforge.net/${pname}-${version}.tar.gz";

View File

@ -1,6 +1,4 @@
{ lib, stdenv, fetchurl, buildPythonPackage, isPy3k }:
with stdenv.lib;
{ lib, buildPythonPackage, fetchurl, isPy3k }:
buildPythonPackage rec {
pname = "cdecimal";

View File

@ -17,7 +17,7 @@ if isPyPy then null else buildPythonPackage rec {
# On Darwin, the cffi tests want to hit libm a lot, and look for it in a global
# impure search path. It's obnoxious how much repetition there is, and how difficult
# it is to get it to search somewhere else (since we do actually have a libm symlink in libSystem)
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
prePatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace testing/cffi0/test_parsing.py \
--replace 'lib_m = "m"' 'lib_m = "System"' \
--replace '"libm" in name' '"libSystem" in name'
@ -29,7 +29,7 @@ if isPyPy then null else buildPythonPackage rec {
'';
# The tests use -Werror but with python3.6 clang detects some unreachable code.
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-unused-command-line-argument -Wno-unreachable-code";
doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate
@ -40,7 +40,7 @@ if isPyPy then null else buildPythonPackage rec {
meta = with lib; {
maintainers = with maintainers; [ domenkozar lnl7 ];
homepage = "https://cffi.readthedocs.org/";
license = with licenses; [ mit ];
license = licenses.mit;
description = "Foreign Function Interface for Python calling C code";
};
}

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, stdenv }:
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "Cheetah3";
@ -11,10 +11,10 @@ buildPythonPackage rec {
doCheck = false; # Circular dependency
meta = {
meta = with lib; {
homepage = "http://www.cheetahtemplate.org/";
description = "A template engine and code generation tool";
license = lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ pjjw ];
license = licenses.mit;
maintainers = with maintainers; [ pjjw ];
};
}

View File

@ -25,7 +25,7 @@ buildPythonPackage rec {
];
checkPhase = ''
pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"}
pytest ${lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"}
'';
meta = with lib; {

View File

@ -41,7 +41,7 @@ buildPythonPackage rec {
-k 'not KeyboardInterrupt and not daemonize and not Autoreload' \
--deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes \
--deselect=cherrypy/test/test_tools.py::ToolTests::testCombinedTools \
${stdenv.lib.optionalString stdenv.isDarwin
${lib.optionalString stdenv.isDarwin
"--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block"}
'';

View File

@ -13,7 +13,7 @@ buildPythonPackage rec {
checkInputs = [ nose ];
# gcc doesn't approve of this code, so disable -Werror
NIX_CFLAGS_COMPILE = "-w" + stdenv.lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing";
NIX_CFLAGS_COMPILE = "-w" + lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing";
checkPhase = "nosetests -v";

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
LC_ALL="en_US.UTF-8";
postPatch = stdenv.lib.optional stdenv.isDarwin ''
postPatch = lib.optional stdenv.isDarwin ''
# Fake the impure dependencies pbpaste and pbcopy
mkdir bin
echo '#!${stdenv.shell}' > bin/pbpaste
@ -38,7 +38,7 @@ buildPythonPackage rec {
wcwidth
attrs
]
++ stdenv.lib.optionals (pythonOlder "3.5") [contextlib2 typing]
++ lib.optionals (pythonOlder "3.5") [contextlib2 typing]
;
@ -46,7 +46,7 @@ buildPythonPackage rec {
# pytest-cov
# argcomplete will generate errors
checkInputs= [ pytest mock which vim glibcLocales pytest-mock ]
++ stdenv.lib.optional (pythonOlder "3.6") [ mock ];
++ lib.optional (pythonOlder "3.6") [ mock ];
checkPhase = ''
# test_path_completion_user_expansion might be fixed in the next release
py.test -k 'not test_path_completion_user_expansion'

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }:
{ lib, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }:
buildPythonPackage rec {
pname = "codecov";
@ -20,9 +20,9 @@ buildPythonPackage rec {
# No tests in archive
doCheck = false;
meta = {
meta = with lib; {
description = "Python report uploader for Codecov";
homepage = "https://codecov.io/";
license = stdenv.lib.licenses.asl20;
license = licenses.asl20;
};
}

View File

@ -1,4 +1,6 @@
{ buildPythonPackage, fetchPypi, stdenv
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
@ -13,10 +15,10 @@ buildPythonPackage rec {
# no tests included in distributed archive
doCheck = false;
meta = {
meta = with lib; {
homepage = "https://github.com/jackparmer/colorlover";
description = "Color scales in Python for humans";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ globin ];
license = licenses.mit;
maintainers = with maintainers; [ globin ];
};
}

View File

@ -18,7 +18,7 @@ buildPythonPackage rec {
checkInputs = [ pytestCheckHook pytest-benchmark numpy arrow ruamel_yaml ];
disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
disabledTests = lib.optionals stdenv.isDarwin [ "test_multiprocessing" ];
pytestFlagsArray = [ "--benchmark-disable" ];

View File

@ -16,7 +16,7 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [ colorlog pyvmomi requests verboselogs pyopenssl setuptools ]
++ stdenv.lib.optional (pythonOlder "3.3") psutil;
++ lib.optional (pythonOlder "3.3") psutil;
checkInputs = [ mock pytestCheckHook pytest-mock qemu ];

View File

@ -33,18 +33,18 @@ buildPythonPackage rec {
outputs = [ "out" "dev" ];
nativeBuildInputs = stdenv.lib.optionals (!isPyPy) [
nativeBuildInputs = lib.optionals (!isPyPy) [
cffi
];
buildInputs = [ openssl ]
++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
propagatedBuildInputs = [
packaging
six
] ++ stdenv.lib.optionals (!isPyPy) [
] ++ lib.optionals (!isPyPy) [
cffi
] ++ stdenv.lib.optionals isPy27 [
] ++ lib.optionals isPy27 [
ipaddress enum34
];

View File

@ -31,18 +31,18 @@ buildPythonPackage rec {
outputs = [ "out" "dev" ];
nativeBuildInputs = stdenv.lib.optionals (!isPyPy) [
nativeBuildInputs = lib.optionals (!isPyPy) [
cffi
];
buildInputs = [ openssl ]
++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
propagatedBuildInputs = [
packaging
six
] ++ stdenv.lib.optionals (!isPyPy) [
] ++ lib.optionals (!isPyPy) [
cffi
] ++ stdenv.lib.optionals isPy27 [
] ++ lib.optionals isPy27 [
ipaddress enum34
];

View File

@ -1,4 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi }:
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "csscompressor";
version = "0.9.5";
@ -10,10 +11,10 @@ buildPythonPackage rec {
doCheck = false; # No tests
meta = {
meta = with lib; {
description = "A python port of YUI CSS Compressor";
homepage = "https://pypi.python.org/pypi/csscompressor";
license = stdenv.lib.licenses.bsd3;
license = licenses.bsd3;
maintainers = [];
};
}

View File

@ -17,7 +17,7 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [ blessings wcwidth ]
++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
++ lib.optionals (pythonOlder "3.5") [ typing ];
checkInputs = [ mock pyte nose ];

View File

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "a4a7a8cdc113d840142d21a796c16c7d329ad35c48f17156446732c83ebc571a";
};
propagatedBuildInputs = [ aenum ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;
propagatedBuildInputs = [ aenum ] ++ lib.optional (pythonOlder "3.4") enum34;
doCheck = !isPy3k;
# tests are not yet ported.

View File

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii";
};
checkPhase = stdenv.lib.optionalString isPy3k ''
checkPhase = lib.optionalString isPy3k ''
${python.interpreter} -m lib2to3 -w test/test_demjson.py
'' + ''
${python.interpreter} test/test_demjson.py

View File

@ -1,7 +1,8 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub
, pytest
, pytestCheckHook
, pytestcov
, pytest_xdist
, pytest-django
@ -11,28 +12,25 @@
buildPythonPackage rec {
pname = "diskcache";
version = "4.1.0";
version = "5.1.0";
src = fetchFromGitHub {
owner = "grantjenks";
repo = "python-diskcache";
rev = "v${version}";
sha256 = "0xy2vpk4hixb4gg871d9sx9wxdz8pi0pmnfdwg4bf8jqfjg022w8";
sha256 = "0xwqw60dbn1x2294galcs08vm6ydcr677lr8slqz8a3ry6sgkhn9";
};
checkInputs = [
pytest
pytestCheckHook
pytestcov
pytest_xdist
pytest-django
mock
];
disabled = lib.versionAtLeast django.version "2.0";
checkPhase = ''
pytest
'';
# Darwin sandbox causes most tests to fail.
doCheck = !stdenv.isDarwin;
meta = with lib; {
description = "Disk and file backed persistent cache";

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
buildPythonPackage rec {
pname = "django-polymorphic";
@ -19,9 +19,9 @@ buildPythonPackage rec {
${python.interpreter} runtests.py
'';
meta = {
meta = with lib; {
homepage = "https://github.com/django-polymorphic/django-polymorphic";
description = "Improved Django model inheritance with automatic downcasting";
license = stdenv.lib.licenses.bsd3;
license = licenses.bsd3;
};
}

View File

@ -2,7 +2,7 @@
numpy, django_colorful, pillow, psycopg2,
pyparsing, django, celery, boto3, importlib-metadata
}:
if stdenv.lib.versionOlder django.version "2.0"
if lib.versionOlder django.version "2.0"
then throw "django-raster requires Django >= 2.0. Consider overiding the python package set to use django_2."
else
buildPythonPackage rec {

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "cf5370a4d7765a9dd6d42a7b96b53c74f9446cd38209211304b210fe0404b861";
};
patches = stdenv.lib.optional withGdal
patches = lib.optional withGdal
(substituteAll {
src = ./1.10-gis-libs.template.patch;
geos = geos;

View File

@ -22,7 +22,7 @@ buildPythonPackage rec {
sha256 = "2d78425ba74c7a1a74b196058b261b9733a8570782f4e2828974777ccca7edf7";
};
patches = stdenv.lib.optional withGdal
patches = lib.optional withGdal
(substituteAll {
src = ./django_3_set_geos_gdal_lib.patch;
geos = geos;

View File

@ -23,7 +23,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
matplotlib
numpy
] ++ stdenv.lib.optionals (pythonOlder "3.8") [
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage }:
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "easydict";
@ -11,9 +11,9 @@ buildPythonPackage rec {
docheck = false; # No tests in archive
meta = {
meta = with lib; {
homepage = "https://github.com/makinacorpus/easydict";
license = with stdenv.lib; licenses.lgpl3;
license = licenses.lgpl3;
description = "Access dict values as attributes (works recursively)";
};
}

View File

@ -18,7 +18,7 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [ elasticsearch python-dateutil six ]
++ stdenv.lib.optional (!isPy3k) ipaddress;
++ lib.optional (!isPy3k) ipaddress;
# ImportError: No module named test_elasticsearch_dsl
# Tests require a local instance of elasticsearch

View File

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage }:
{ lib, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
pname = "enzyme";
@ -12,9 +12,9 @@ buildPythonPackage rec {
sha256 = "1fv2kh2v4lwj0hhrhj9pib1pdjh01yr4xgyljhx11l94gjlpy5pj";
};
meta = {
meta = with lib; {
homepage = "https://github.com/Diaoul/enzyme";
license = with stdenv.lib; licenses.asl20;
license = licenses.asl20;
description = "Python video metadata parser";
};
}

View File

@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec {
wheel
];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
propagatedBuildInputs = [
python

View File

@ -20,7 +20,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ six monotonic ];
checkInputs = [ testtools nose ] ++ stdenv.lib.optionals (!isPy3k) [ futures ];
checkInputs = [ testtools nose ] ++ lib.optionals (!isPy3k) [ futures ];
checkPhase = ''
nosetests

View File

@ -12,7 +12,7 @@ buildPythonPackage rec {
sha256 = "0s5r6l39ck2scks54hmwwdf4lcihqqnqzjfx9lz2b67vxkajpwmc";
};
propagatedBuildInputs = [ six termcolor ] ++ stdenv.lib.optional isPy27 enum34;
propagatedBuildInputs = [ six termcolor ] ++ lib.optional isPy27 enum34;
checkInputs = [ hypothesis mock python-Levenshtein pytest ];

View File

@ -14,10 +14,10 @@ buildPythonPackage rec {
checkInputs = [ pytest mock pytestrunner ];
propagatedBuildInputs = [ pyflakes pycodestyle mccabe ]
++ stdenv.lib.optionals (pythonOlder "3.2") [ configparser functools32 ]
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ]
++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ]
++ stdenv.lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
++ lib.optionals (pythonOlder "3.2") [ configparser functools32 ]
++ lib.optionals (pythonOlder "3.4") [ enum34 ]
++ lib.optionals (pythonOlder "3.5") [ typing ]
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
# fixtures fail to initialize correctly
checkPhase = ''

View File

@ -1,6 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, glibcLocales, flask, flask_sqlalchemy, flask_script, alembic }:
with stdenv.lib;
{ lib, buildPythonPackage, fetchPypi, isPy3k, glibcLocales, flask, flask_sqlalchemy, flask_script, alembic }:
buildPythonPackage rec {
pname = "Flask-Migrate";
@ -11,15 +9,15 @@ buildPythonPackage rec {
sha256 = "a69d508c2e09d289f6e55a417b3b8c7bfe70e640f53d2d9deb0d056a384f37ee";
};
checkInputs = [ flask_script ] ++ optional isPy3k glibcLocales;
checkInputs = [ flask_script ] ++ lib.optional isPy3k glibcLocales;
propagatedBuildInputs = [ flask flask_sqlalchemy alembic ];
# tests invoke the flask cli which uses click and therefore has py3k encoding troubles
preCheck = optionalString isPy3k ''
preCheck = lib.optionalString isPy3k ''
export LANG="en_US.UTF-8"
'';
meta = {
meta = with lib; {
description = "SQLAlchemy database migrations for Flask applications using Alembic";
license = licenses.mit;
homepage = "https://github.com/miguelgrinberg/Flask-Migrate";

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ flask ];
checkInputs = [ blinker ] ++ stdenv.lib.optionals (!isPy3k) [ twill ];
checkInputs = [ blinker ] ++ lib.optionals (!isPy3k) [ twill ];
# twill integration is outdated in Python 2, hence it the tests fails.
# Some of the tests use localhost networking on darwin.

View File

@ -1,4 +1,4 @@
{ stdenv
{ lib
, buildPythonPackage
, flatbuffers
}:
@ -16,6 +16,6 @@ buildPythonPackage rec {
meta = flatbuffers.meta // {
description = "Python runtime library for use with the Flatbuffers serialization format";
maintainers = with stdenv.lib.maintainers; [ wulfsta ];
maintainers = with lib.maintainers; [ wulfsta ];
};
}

View File

@ -14,7 +14,7 @@ buildPythonPackage rec {
buildInputs = [ unittest2 ];
# https://github.com/testing-cabal/funcsigs/issues/10
patches = stdenv.lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ];
patches = lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ];
meta = with lib; {
description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+";

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
buildInputs = [ libev ];
propagatedBuildInputs = [
zope_interface
] ++ stdenv.lib.optionals (!isPyPy) [ greenlet ];
] ++ lib.optionals (!isPyPy) [ greenlet ];
checkPhase = ''
cd greentest

View File

@ -26,7 +26,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
numpy
] ++ stdenv.lib.optional isPy27 [ contextlib2 mock importlib-resources ];
] ++ lib.optional isPy27 [ contextlib2 mock importlib-resources ];
checkInputs = [
scikitimage

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, fetchPypi
, buildPythonPackage
, pkg-config
@ -10,8 +10,6 @@
, isPy3k
}:
with stdenv.lib;
buildPythonPackage rec {
pname = "GooCalendar";
version = "0.7.1";

View File

@ -21,13 +21,13 @@ buildPythonPackage rec {
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cython pkg-config ]
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
++ lib.optional stdenv.isDarwin darwin.cctools;
buildInputs = [ c-ares openssl zlib ];
propagatedBuildInputs = [ six protobuf ]
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
++ lib.optionals (isPy27) [ enum34 futures ];
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
preBuild = lib.optionalString stdenv.isDarwin "unset AR";
GRPC_BUILD_WITH_BORING_SSL_ASM = "";
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;

View File

@ -1,4 +1,5 @@
{ buildPythonPackage
{ lib
, buildPythonPackage
, fetchurl
, meson
, ninja
@ -51,11 +52,9 @@ buildPythonPackage rec {
# https://github.com/NixOS/nixpkgs/issues/47390
installCheckPhase = "meson test --print-errorlogs";
meta = {
meta = with lib; {
homepage = "https://gstreamer.freedesktop.org";
description = "Python bindings for GStreamer";
license = stdenv.lib.licenses.lgpl2Plus;
license = licenses.lgpl2Plus;
};
}

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, buildPythonPackage
, python
, numba
@ -28,7 +29,7 @@ buildPythonPackage {
'add_runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]'
'';
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
postInstall = lib.optionalString stdenv.isDarwin ''
install_name_tool -add_rpath ${libgumath}/lib $out/${python.sitePackages}/gumath/_gumath.*.so
'';

View File

@ -14,7 +14,7 @@ buildPythonPackage {
sha256 = "0r9phq5yrmj968vdvy9vivli35wn1j9a6iwshp69wl7q4p0x8q2b";
};
patches = stdenv.lib.optionals stdenv.isDarwin [
patches = lib.optionals stdenv.isDarwin [
./no-darwin-cflags.patch
./no-xcode.patch
];

View File

@ -1,11 +1,9 @@
{ stdenv, fetchPypi, isPy27, python, buildPythonPackage, pythonOlder
{ lib, fetchPypi, isPy27, python, buildPythonPackage, pythonOlder
, numpy, hdf5, cython, six, pkgconfig, unittest2, fetchpatch
, mpi4py ? null, openssh, pytestCheckHook, cached-property }:
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
with stdenv.lib;
let
mpi = hdf5.mpi;
mpiSupport = hdf5.mpiSupport;
@ -31,27 +29,26 @@ in buildPythonPackage rec {
postConfigure = ''
# Needed to run the tests reliably. See:
# https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30
${optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
${lib.optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"}
'';
preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
# tests now require pytest-mpi, which isn't available and difficult to package
doCheck = false;
checkInputs = optional isPy27 unittest2 ++ [ pytestCheckHook openssh ];
checkInputs = lib.optional isPy27 unittest2 ++ [ pytestCheckHook openssh ];
nativeBuildInputs = [ pkgconfig cython ];
buildInputs = [ hdf5 ]
++ optional mpiSupport mpi;
++ lib.optional mpiSupport mpi;
propagatedBuildInputs = [ numpy six]
++ optionals mpiSupport [ mpi4py openssh ]
++ optionals (pythonOlder "3.8") [ cached-property ];
++ lib.optionals mpiSupport [ mpi4py openssh ]
++ lib.optionals (pythonOlder "3.8") [ cached-property ];
pythonImportsCheck = [ "h5py" ];
meta = {
description =
"Pythonic interface to the HDF5 binary data format";
meta = with lib; {
description = "Pythonic interface to the HDF5 binary data format";
homepage = "http://www.h5py.org/";
license = stdenv.lib.licenses.bsd2;
license = licenses.bsd2;
};
}

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
@ -19,6 +19,6 @@ buildPythonPackage rec {
description = "Enables the changeset evolution feature of Mercurial core";
homepage = "https://www.mercurial-scm.org/doc/evolution/";
maintainers = with maintainers; [ xavierzwirtz ];
license = stdenv.lib.licenses.gpl2Plus;
license = licenses.gpl2Plus;
};
}

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, buildPythonPackage
, fetchPypi
, dulwich
@ -30,7 +30,7 @@ buildPythonPackage rec {
description = "Push and pull from a Git server using Mercurial";
homepage = "http://hg-git.github.com/";
maintainers = with maintainers; [ koral ];
license = stdenv.lib.licenses.gpl2;
license = licenses.gpl2;
};
}

View File

@ -10,16 +10,16 @@ buildPythonPackage rec {
};
propagatedBuildInputs =
stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++
stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]) ++
lib.optionals stdenv.isLinux [ libusb1 udev ] ++
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]) ++
[ cython ];
# Fix the USB backend library lookup
postPatch = stdenv.lib.optionalString stdenv.isLinux ''
postPatch = lib.optionalString stdenv.isLinux ''
libusb=${libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
'' + stdenv.lib.optionalString stdenv.isDarwin ''
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py --replace 'macos_sdk_path =' 'macos_sdk_path = "" #'
'';

View File

@ -29,9 +29,9 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = stdenv.lib.optionals withMPI [ mpi ];
buildInputs = lib.optionals withMPI [ mpi ];
propagatedBuildInputs = [ python.pkgs.numpy ]
++ stdenv.lib.optionals withMPI [ python.pkgs.mpi4py ];
++ lib.optionals withMPI [ python.pkgs.mpi4py ];
dontAddPrefix = true;
cmakeFlags = [

View File

@ -1,4 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi }:
{ lib, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "htmlmin";
version = "0.1.12";
@ -10,10 +11,10 @@ buildPythonPackage rec {
# Tests run fine in a normal source checkout, but not when being built by nix.
doCheck = false;
meta = {
meta = with lib; {
description = "A configurable HTML Minifier with safety features";
homepage = "https://pypi.python.org/pypi/htmlmin";
license = stdenv.lib.licenses.bsd3;
license = licenses.bsd3;
maintainers = [];
};
}

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, buildPythonPackage
, fetchPypi
, tornado
@ -20,7 +20,7 @@ buildPythonPackage rec {
# drop this for version > 0.9.7
# Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394
doCheck = stdenv.lib.versionAtLeast version "0.9.8";
doCheck = lib.versionAtLeast version "0.9.8";
src = fetchPypi {
inherit pname version;
@ -37,7 +37,7 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true;
# Those flaky tests are failing intermittently on all platforms
NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [
NOSE_EXCLUDE = lib.concatStringsSep "," [
"tests.functional.test_httplib2.test_callback_response"
"tests.functional.test_requests.test_streaming_responses"
"tests.functional.test_httplib2.test_callback_response"

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, buildPythonPackage
, fetchPypi
, tornado
@ -23,7 +23,7 @@ buildPythonPackage rec {
# drop this for version > 0.9.7
# Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394
doCheck = stdenv.lib.versionAtLeast version "0.9.8";
doCheck = lib.versionAtLeast version "0.9.8";
src = fetchPypi {
inherit pname version;
@ -44,7 +44,7 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true;
# Those flaky tests are failing intermittently on all platforms
NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [
NOSE_EXCLUDE = lib.concatStringsSep "," [
"tests.functional.test_httplib2.test_callback_response"
"tests.functional.test_requests.test_streaming_responses"
"tests.functional.test_httplib2.test_callback_response"

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi
{ lib, stdenv, buildPythonPackage, fetchPypi
, pytest, pytestcov, watchdog, mock
}:
@ -17,5 +17,5 @@ buildPythonPackage rec {
# FIXME: watchdog dependency is disabled on Darwin because of #31865, which causes very silent
# segfaults in the testsuite that end up failing the tests in a background thread (in myapp)
checkInputs = [ pytest pytestcov mock ] ++ stdenv.lib.optional (!stdenv.isDarwin) watchdog;
checkInputs = [ pytest pytestcov mock ] ++ lib.optional (!stdenv.isDarwin) watchdog;
}

View File

@ -24,7 +24,7 @@ buildPythonPackage rec {
inherit pname version;
};
checkInputs = [ pytest psutil ] ++ stdenv.lib.optionals isPy3k [
checkInputs = [ pytest psutil ] ++ lib.optionals isPy3k [
imageio-ffmpeg ffmpeg_3
];
propagatedBuildInputs = [ numpy pillow ];

View File

@ -11,7 +11,7 @@ buildPythonPackage rec {
sha256 = "0l33sfwdh4bfprmzp2kx0d9098g6yxbnhyyx9qr3kzczpm0jg9vy";
};
patchPhase = stdenv.lib.optionalString isPy3k ''
patchPhase = lib.optionalString isPy3k ''
sed 's/python-memcached/python3-memcached/' \
-i ./influxgraph.egg-info/requires.txt \
-i ./setup.py

View File

@ -33,7 +33,7 @@ buildPythonPackage rec {
sha256 = "4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906";
};
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
prePatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py --replace "'gnureadline'" " "
'';

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pipInstallHook
@ -49,7 +50,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = [
pcsclite
nettle
] ++ stdenv.lib.optionals stdenv.isDarwin [ PCSC ];
] ++ lib.optionals stdenv.isDarwin [ PCSC ];
# Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
doCheck = false;
@ -83,7 +84,7 @@ rustPlatform.buildRustPackage rec {
pythonImportsCheck = [ "johnnycanencrypt" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://github.com/kushaldas/johnnycanencrypt";
description = "Python module for OpenPGP written in Rust";
license = licenses.gpl3Plus;

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
{ lib, buildPythonPackage, fetchFromGitHub
, pbr, click, dataclasses-json, htmlmin, jinja2, markdown2, pygments, pytz, pyyaml, requests, pytestCheckHook, beautifulsoup4, tox
}:
@ -26,7 +26,7 @@ buildPythonPackage rec {
checkInputs = [ pytestCheckHook beautifulsoup4 ];
pytestFlagsArray = [ "--ignore tests/generate_test.py" ];
meta = with stdenv.lib; {
meta = with lib; {
description = "Quickly generate HTML documentation from a JSON schema";
homepage = "https://github.com/coveooss/json-schema-for-humans";
license = licenses.asl20;

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, buildPythonPackage
, fetchPypi
}:
@ -15,7 +15,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Resolve JSON Pointers in Python";
homepage = "https://github.com/stefankoegl/python-json-pointer";
license = stdenv.lib.licenses.bsd2; # "Modified BSD license, says pypi"
license = licenses.bsd2; # "Modified BSD license, says pypi"
};
}

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
checkInputs = [ pytest pytest-flake8 ];
propagatedBuildInputs = [ dbus-python entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage;
propagatedBuildInputs = [ dbus-python entrypoints ] ++ lib.optional stdenv.isLinux secretstorage;
doCheck = !stdenv.isDarwin;

View File

@ -20,7 +20,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools_scm toml ];
propagatedBuildInputs = [ six ];
checkInputs = [ pytest keyring ] ++ stdenv.lib.optional (pythonOlder "3.3") backports_unittest-mock;
checkInputs = [ pytest keyring ] ++ lib.optional (pythonOlder "3.3") backports_unittest-mock;
# heavily relies on importing tests from keyring package
doCheck = false;

View File

@ -14,7 +14,7 @@ buildPythonPackage rec {
sha256 = "53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75";
};
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
# Does not include tests
doCheck = false;

View File

@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248";
};
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
nativeBuildInputs = [
cppy

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildPythonPackage, isPy3k, pycurl, six, rpm, dateutil }:
{ lib, fetchurl, buildPythonPackage, isPy3k, pycurl, six, rpm, dateutil }:
buildPythonPackage rec {
pname = "koji";
@ -23,10 +23,10 @@ buildPythonPackage rec {
rm -rf $out/nix
'';
meta = {
meta = with lib; {
description = "An RPM-based build system";
homepage = "https://pagure.io/koji";
license = stdenv.lib.licenses.lgpl21;
platforms = stdenv.lib.platforms.unix;
license = licenses.lgpl21;
platforms = platforms.unix;
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, six, pytest }:
{ lib, buildPythonPackage, fetchPypi, six, pytest }:
buildPythonPackage rec {
pname = "latexcodec";
@ -17,10 +17,10 @@ buildPythonPackage rec {
pytest
'';
meta = {
meta = with lib; {
homepage = "https://github.com/mcmtroffaes/latexcodec";
description = "Lexer and codec to work with LaTeX code in Python";
license = stdenv.lib.licenses.mit;
license = licenses.mit;
};
}

View File

@ -25,7 +25,7 @@ buildPythonPackage rec {
sha256 = "0fb93h2wxm9as9rsywlgz2ng4wrlbjphn6mgbhj6nls2i86rrdxk";
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit ];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
propagatedBuildInputs = [
cryptography click construct ecdsa hidapi intelhex pillow protobuf requests tabulate
];

View File

@ -1,4 +1,4 @@
{ lib, stdenv
{ lib
, buildPythonPackage
, isPy27
, fetchPypi
@ -20,7 +20,7 @@ buildPythonPackage rec {
patches = [
(substituteAll {
src = ./fix-paths.patch;
libevdev = stdenv.lib.getLib pkgs.libevdev;
libevdev = lib.getLib pkgs.libevdev;
})
];

View File

@ -48,7 +48,7 @@ buildPythonPackage rec {
postFixup = ''
rm $out/lib/libgpuarray-static.a
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
'' + lib.optionalString (!stdenv.isDarwin) ''
function fixRunPath {
p=$(patchelf --print-rpath $1)
patchelf --set-rpath "$p:$libraryPath" $1

View File

@ -26,7 +26,7 @@ buildPythonPackage rec {
# we never actually explicitly call the install command so this is the only way
# to inject these options to it - however, openmp-library doesn't appear to have
# any effect, so we have to inject it into NIX_LDFLAGS manually below
postPatch = stdenv.lib.optionalString stdenv.cc.isClang ''
postPatch = lib.optionalString stdenv.cc.isClang ''
cat >> setup.cfg <<EOF
[install]
@ -44,7 +44,7 @@ buildPythonPackage rec {
postConfigure = ''
export HOME=$(mktemp -d)
'' + stdenv.lib.optionalString stdenv.cc.isClang ''
'' + lib.optionalString stdenv.cc.isClang ''
export NIX_LDFLAGS="$NIX_LDFLAGS -L${llvmPackages.openmp}/lib -lomp"
'';

View File

@ -15,9 +15,9 @@ buildPythonPackage rec {
disabled = (pythonOlder "2.7");
propagatedBuildInputs = [ requests future ]
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ];
++ lib.optionals (pythonOlder "3.4") [ enum34 ];
postPatch = (stdenv.lib.optionalString (!pythonOlder "3.4") ''
postPatch = (lib.optionalString (!pythonOlder "3.4") ''
sed -i -e '/"enum34",/d' setup.py
'');

Some files were not shown because too many files have changed in this diff Show More