diff --git a/pkgs/development/python-modules/rabbitpy/default.nix b/pkgs/development/python-modules/rabbitpy/default.nix index 9e6b9dc0d67..7406faca601 100644 --- a/pkgs/development/python-modules/rabbitpy/default.nix +++ b/pkgs/development/python-modules/rabbitpy/default.nix @@ -1,6 +1,6 @@ { stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , mock , nose , pamqp @@ -10,13 +10,29 @@ buildPythonPackage rec { version = "1.0.0"; pname = "rabbitpy"; - src = fetchPypi { - inherit pname version; - sha256 = "54d33746d0c6a686417cd354346803945df0740b39fb92842d259387100db126"; + # No tests in the pypi tarball, so we directly fetch from git + src = fetchFromGitHub { + owner = "gmr"; + repo = pname; + rev = version; + sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6"; }; - buildInputs = [ mock nose ]; propagatedBuildInputs = [ pamqp ]; + checkInputs = [ mock nose ]; + + checkPhase = '' + runHook preCheck + rm tests/integration_tests.py # Impure tests requiring network + nosetests tests + runHook postCheck + ''; + + postPatch = '' + # See: https://github.com/gmr/rabbitpy/issues/118 + substituteInPlace setup.py \ + --replace 'pamqp>=1.6.1,<2.0' 'pamqp' + ''; meta = with stdenv.lib; { description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library"; diff --git a/pkgs/tools/misc/kanshi/default.nix b/pkgs/tools/misc/kanshi/default.nix index 0efbed6e275..8909a0c0eb5 100644 --- a/pkgs/tools/misc/kanshi/default.nix +++ b/pkgs/tools/misc/kanshi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, libudev }: +{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, udev }: rustPlatform.buildRustPackage { pname = "kanshi-unstable"; @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage sha256 = "10lfdan86bmwazpma6ixnv46z9cnf879gxln8gx87v7a1x3ss0bh"; }; - buildInputs = [ pkgconfig libudev ]; + buildInputs = [ pkgconfig udev ]; cargoSha256 = "sha256:0lf1zfmq9ypxk86ma0n4nczbklmjs631wdzfx4wd3cvhghyr8nkq"; @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage homepage = "https://github.com/emersion/kanshi"; downloadPage = "https://github.com/emersion/kanshi"; license = stdenv.lib.licenses.mit; - maintainers = stdenv.lib.maintainers.balsoft; + maintainers = [ stdenv.lib.maintainers.balsoft ]; platforms = stdenv.lib.platforms.linux; }; }