diff --git a/pkgs/applications/networking/bee/bee-clef.nix b/pkgs/applications/networking/bee/bee-clef.nix index a94386ea3f1..9e36f8670d4 100644 --- a/pkgs/applications/networking/bee/bee-clef.nix +++ b/pkgs/applications/networking/bee/bee-clef.nix @@ -1,4 +1,4 @@ -{ version ? "release", stdenv, lib, substituteAll, fetchFromGitHub, go-ethereum }: +{ version ? "release", stdenv, lib, fetchFromGitHub, go-ethereum }: stdenv.mkDerivation rec { pname = "bee-clef"; diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index 2eeb151bebe..4432d9ddeec 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -1,22 +1,15 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkg-config, qt5 +{ lib, stdenv, fetchFromGitHub, pkg-config, qt5 , avahi, boost, libopus, libsndfile, protobuf, speex, libcap , alsaLib, python3 , rnnoise -, jackSupport ? false, libjack2 ? null -, speechdSupport ? false, speechd ? null -, pulseSupport ? false, libpulseaudio ? null -, iceSupport ? false, zeroc-ice ? null -, grpcSupport ? false, grpc ? null, c-ares ? null, abseil-cpp ? null, which ? null +, jackSupport ? false, libjack2 +, speechdSupport ? false, speechd +, pulseSupport ? false, libpulseaudio +, iceSupport ? false, zeroc-ice +, grpcSupport ? false, grpc, c-ares, abseil-cpp, which , nixosTests }: -assert jackSupport -> libjack2 != null; -assert speechdSupport -> speechd != null; -assert pulseSupport -> libpulseaudio != null; -assert iceSupport -> zeroc-ice != null; -assert grpcSupport -> (grpc != null && c-ares != null && abseil-cpp != null && which != null); - -with lib; let generic = overrides: source: qt5.mkDerivation (source // overrides // { pname = overrides.type; @@ -42,8 +35,8 @@ let "CONFIG+=no-bundled-opus" "CONFIG+=no-bundled-speex" "DEFINES+=PLUGIN_PATH=${placeholder "out"}/lib/mumble" - ] ++ optional (!speechdSupport) "CONFIG+=no-speechd" - ++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" + ] ++ lib.optional (!speechdSupport) "CONFIG+=no-speechd" + ++ lib.optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" ++ (overrides.configureFlags or [ ]); preConfigure = '' @@ -64,11 +57,9 @@ let runHook postInstall ''; - enableParallelBuilding = true; - passthru.tests.connectivity = nixosTests.mumble; - meta = { + meta = with lib; { description = "Low-latency, high quality voice chat software"; homepage = "https://mumble.info"; license = licenses.bsd3; @@ -82,16 +73,16 @@ let nativeBuildInputs = [ qt5.qttools ]; buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] - ++ optional stdenv.isLinux alsaLib - ++ optional jackSupport libjack2 - ++ optional speechdSupport speechd - ++ optional pulseSupport libpulseaudio; + ++ lib.optional stdenv.isLinux alsaLib + ++ lib.optional jackSupport libjack2 + ++ lib.optional speechdSupport speechd + ++ lib.optional pulseSupport libpulseaudio; configureFlags = [ "CONFIG+=no-server" ]; - NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher"; + NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher"; installPhase = '' # bin stuff @@ -113,18 +104,18 @@ let server = source: generic { type = "murmur"; - postPatch = optional iceSupport '' + postPatch = lib.optional iceSupport '' grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g' ''; configureFlags = [ "CONFIG+=no-client" - ] ++ optional (!iceSupport) "CONFIG+=no-ice" - ++ optional grpcSupport "CONFIG+=grpc"; + ] ++ lib.optional (!iceSupport) "CONFIG+=no-ice" + ++ lib.optional grpcSupport "CONFIG+=grpc"; buildInputs = [ libcap ] - ++ optional iceSupport zeroc-ice - ++ optionals grpcSupport [ grpc c-ares abseil-cpp which ]; + ++ lib.optional iceSupport zeroc-ice + ++ lib.optionals grpcSupport [ grpc c-ares abseil-cpp which ]; installPhase = '' # bin stuff diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix index 2e7c9c2401c..5d9c3fe1669 100644 --- a/pkgs/development/python-modules/aiobotocore/default.nix +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -1,10 +1,7 @@ { lib - , buildPythonPackage , fetchPypi , pythonOlder -, pytestrunner -, typing-extensions , wrapt , aioitertools , aiohttp diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix index 065d4409ec1..635203f94c2 100644 --- a/pkgs/development/python-modules/botocore/default.nix +++ b/pkgs/development/python-modules/botocore/default.nix @@ -28,10 +28,6 @@ buildPythonPackage rec { urllib3 ]; - postPatch = '' - substituteInPlace setup.py --replace "docutils>=0.10,<0.16" "docutils>=0.10" - ''; - checkInputs = [ mock nose ]; checkPhase = '' diff --git a/pkgs/development/python-modules/chalice/default.nix b/pkgs/development/python-modules/chalice/default.nix index 5445157b853..9115b1d57c3 100644 --- a/pkgs/development/python-modules/chalice/default.nix +++ b/pkgs/development/python-modules/chalice/default.nix @@ -52,8 +52,7 @@ buildPythonPackage rec { postPatch = '' sed -i setup.py -e "/pip>=/c\'pip'," substituteInPlace setup.py \ - --replace 'typing==3.6.4' 'typing' \ - --replace 'attrs>=19.3.0,<20.3.0' 'attrs' + --replace 'typing==3.6.4' 'typing' ''; checkPhase = '' diff --git a/pkgs/development/python-modules/kombu/default.nix b/pkgs/development/python-modules/kombu/default.nix index 1aa22a62e19..a5ca1a7ab2a 100644 --- a/pkgs/development/python-modules/kombu/default.nix +++ b/pkgs/development/python-modules/kombu/default.nix @@ -22,8 +22,6 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements/test.txt \ --replace "pytest-sugar" "" - substituteInPlace requirements/default.txt \ - --replace "amqp==2.5.1" "amqp~=2.5" ''; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pecan/default.nix b/pkgs/development/python-modules/pecan/default.nix index a66c4077c3c..50b62503ff8 100644 --- a/pkgs/development/python-modules/pecan/default.nix +++ b/pkgs/development/python-modules/pecan/default.nix @@ -16,7 +16,6 @@ , Kajiki , mock , sqlalchemy -, uwsgi , virtualenv }: diff --git a/pkgs/development/python-modules/serverlessrepo/default.nix b/pkgs/development/python-modules/serverlessrepo/default.nix index 1e6f8307fbc..2a8267710a0 100644 --- a/pkgs/development/python-modules/serverlessrepo/default.nix +++ b/pkgs/development/python-modules/serverlessrepo/default.nix @@ -29,10 +29,6 @@ buildPythonPackage rec { pytest tests/unit ''; - postPatch = '' - substituteInPlace setup.py --replace "pyyaml~=3.12" "pyyaml~=5.1" - ''; - meta = with lib; { homepage = "https://github.com/awslabs/aws-serverlessrepo-python"; description = "Helpers for working with the AWS Serverless Application Repository"; diff --git a/pkgs/development/python-modules/shapely/default.nix b/pkgs/development/python-modules/shapely/default.nix index b5875818b95..91c34734a8c 100644 --- a/pkgs/development/python-modules/shapely/default.nix +++ b/pkgs/development/python-modules/shapely/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, substituteAll, pythonOlder -, geos, pytest, cython +, geos, pytestCheckHook, cython , numpy }: @@ -18,10 +18,10 @@ buildPythonPackage rec { cython ]; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ numpy ]; + checkInputs = [ pytestCheckHook ]; + # environment variable used in shapely/_buildcfg.py GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}"; @@ -38,12 +38,14 @@ buildPythonPackage rec { }) ]; - # Disable the tests that improperly try to use the built extensions - checkPhase = '' + preCheck = '' rm -r shapely # prevent import of local shapely - py.test tests ''; + disabledTests = [ + "test_collection" + ]; + meta = with lib; { description = "Geometric objects, predicates, and operations"; maintainers = with maintainers; [ knedlsepp ]; diff --git a/pkgs/development/python-modules/smart_open/default.nix b/pkgs/development/python-modules/smart_open/default.nix index 3a1c890f048..389feef2b42 100644 --- a/pkgs/development/python-modules/smart_open/default.nix +++ b/pkgs/development/python-modules/smart_open/default.nix @@ -21,11 +21,6 @@ buildPythonPackage rec { sha256 = "26af5c1a3f2b76aab8c3200310f0fc783790ec5a231ffeec102e620acdd6262e"; }; - # nixpkgs version of moto is >=1.2.0, remove version pin to fix build - postPatch = '' - substituteInPlace ./setup.py --replace "moto==0.4.31" "moto" - ''; - # moto>=1.0.0 is backwards-incompatible and some tests fail with it, # so disable tests for now doCheck = false; diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix index 22223f2a27e..cd19c77cab3 100644 --- a/pkgs/servers/rippled/default.nix +++ b/pkgs/servers/rippled/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchgit, fetchurl, runCommand, git, cmake, pkg-config +{ lib, stdenv, fetchgit, fetchurl, git, cmake, pkg-config , openssl, zlib, boost, grpc, c-ares, abseil-cpp, protobuf3_8, libnsl }: let diff --git a/pkgs/tools/admin/aws-mfa/default.nix b/pkgs/tools/admin/aws-mfa/default.nix index 12f63e627e6..53855b6d28d 100644 --- a/pkgs/tools/admin/aws-mfa/default.nix +++ b/pkgs/tools/admin/aws-mfa/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonApplication , fetchFromGitHub -, pkgs , boto3 }: diff --git a/pkgs/tools/backup/btrbk/default.nix b/pkgs/tools/backup/btrbk/default.nix index 63808d48512..c619a69c111 100644 --- a/pkgs/tools/backup/btrbk/default.nix +++ b/pkgs/tools/backup/btrbk/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, coreutils, bash, btrfs-progs, openssh, perl, perlPackages +{ lib, stdenv, fetchurl, bash, btrfs-progs, openssh, perl, perlPackages , util-linux, asciidoc, asciidoctor, mbuffer, makeWrapper }: stdenv.mkDerivation rec {