kanshi: init at 2019-02-02

This commit is contained in:
Александр Бантьев 2019-03-18 01:12:48 +03:00
commit bcc8494e2c
2 changed files with 24 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, mock , mock
, nose , nose
, pamqp , pamqp
@ -10,13 +10,29 @@ buildPythonPackage rec {
version = "1.0.0"; version = "1.0.0";
pname = "rabbitpy"; pname = "rabbitpy";
src = fetchPypi { # No tests in the pypi tarball, so we directly fetch from git
inherit pname version; src = fetchFromGitHub {
sha256 = "54d33746d0c6a686417cd354346803945df0740b39fb92842d259387100db126"; owner = "gmr";
repo = pname;
rev = version;
sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6";
}; };
buildInputs = [ mock nose ];
propagatedBuildInputs = [ pamqp ]; 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; { meta = with stdenv.lib; {
description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library"; description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, libudev }: { stdenv, fetchFromGitHub, rustPlatform, pkgconfig, udev }:
rustPlatform.buildRustPackage rustPlatform.buildRustPackage
{ {
pname = "kanshi-unstable"; pname = "kanshi-unstable";
@ -11,7 +11,7 @@ rustPlatform.buildRustPackage
sha256 = "10lfdan86bmwazpma6ixnv46z9cnf879gxln8gx87v7a1x3ss0bh"; sha256 = "10lfdan86bmwazpma6ixnv46z9cnf879gxln8gx87v7a1x3ss0bh";
}; };
buildInputs = [ pkgconfig libudev ]; buildInputs = [ pkgconfig udev ];
cargoSha256 = "sha256:0lf1zfmq9ypxk86ma0n4nczbklmjs631wdzfx4wd3cvhghyr8nkq"; cargoSha256 = "sha256:0lf1zfmq9ypxk86ma0n4nczbklmjs631wdzfx4wd3cvhghyr8nkq";
@ -34,7 +34,7 @@ rustPlatform.buildRustPackage
homepage = "https://github.com/emersion/kanshi"; homepage = "https://github.com/emersion/kanshi";
downloadPage = "https://github.com/emersion/kanshi"; downloadPage = "https://github.com/emersion/kanshi";
license = stdenv.lib.licenses.mit; license = stdenv.lib.licenses.mit;
maintainers = stdenv.lib.maintainers.balsoft; maintainers = [ stdenv.lib.maintainers.balsoft ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.linux;
}; };
} }