From 2badf9a6f88e5620f428b55f3bdedfe041ebf76c Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 30 Mar 2018 00:01:00 +0000 Subject: [PATCH 1/2] libffi: simplify using `checkInputs` --- pkgs/development/libraries/libffi/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 1c7c0715e75..c35448066ee 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -1,5 +1,6 @@ -{ stdenv, fetchurl, fetchpatch, dejagnu, doCheck ? false +{ stdenv, fetchurl, fetchpatch , buildPlatform, hostPlatform, autoreconfHook +, doCheck ? true, dejagnu }: stdenv.mkDerivation rec { @@ -40,8 +41,6 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "man" "info" ]; - buildInputs = stdenv.lib.optional doCheck dejagnu; - nativeBuildInputs = stdenv.lib.optional hostPlatform.isRiscV autoreconfHook; configureFlags = [ @@ -54,6 +53,8 @@ stdenv.mkDerivation rec { NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/} ''; + checkInputs = [ dejagnu ]; + inherit doCheck; dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling. From acbee90e2becd4aa90412094df55c7a629da1435 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 30 Mar 2018 00:01:53 +0000 Subject: [PATCH 2/2] pythonPackges.hypothesis, pythonPackages.pytest: simpify dependency cycle fix --- pkgs/development/python-modules/hypothesis/default.nix | 2 +- pkgs/top-level/python-packages.nix | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/hypothesis/default.nix b/pkgs/development/python-modules/hypothesis/default.nix index d5ee59ac2d9..83e369ec0fc 100644 --- a/pkgs/development/python-modules/hypothesis/default.nix +++ b/pkgs/development/python-modules/hypothesis/default.nix @@ -20,9 +20,9 @@ buildPythonPackage rec { sha256 = "063sn5m1966gvm3wrlxczdq4vw0r94h3nd9xpr94qxahpg2r4bpb"; }; - checkInputs = [ pytest pytest_xdist flaky mock ]; propagatedBuildInputs = [ attrs coverage ] ++ lib.optional (!isPy3k) [ enum34 ]; + checkInputs = [ pytest pytest_xdist flaky mock ]; inherit doCheck; # https://github.com/DRMacIver/hypothesis/issues/300 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index de4966ec953..fd62c3adb94 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1923,11 +1923,8 @@ in { pytest = self.pytest_36; pytest_36 = callPackage ../development/python-modules/pytest { - hypothesis = self.hypothesis.override { - # hypothesis requires pytest that causes dependency cycle - doCheck = false; - pytest = null; - }; + # hypothesis tests require pytest that causes dependency cycle + hypothesis = self.hypothesis.override { doCheck = false; }; }; # Needed for celery