|
|
@ -9,7 +9,8 @@ |
|
|
|
, which |
|
|
|
, which |
|
|
|
, jeepney |
|
|
|
, jeepney |
|
|
|
, loguru |
|
|
|
, loguru |
|
|
|
, pytestCheckHook |
|
|
|
, pytest |
|
|
|
|
|
|
|
, dbus |
|
|
|
, coreutils |
|
|
|
, coreutils |
|
|
|
}: |
|
|
|
}: |
|
|
|
|
|
|
|
|
|
|
@ -41,16 +42,29 @@ buildPythonPackage rec { |
|
|
|
}) |
|
|
|
}) |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ loguru ] |
|
|
|
propagatedBuildInputs = [ |
|
|
|
++ lib.optionals stdenv.isLinux [ jeepney ]; |
|
|
|
loguru |
|
|
|
|
|
|
|
] ++ lib.optionals stdenv.isLinux [ |
|
|
|
|
|
|
|
jeepney |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ]; |
|
|
|
checkInputs = [ |
|
|
|
|
|
|
|
pytest |
|
|
|
|
|
|
|
] ++ lib.optionals stdenv.isLinux [ |
|
|
|
|
|
|
|
dbus |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
# Tests search for "afplay" binary which is built in to MacOS and not available in nixpkgs |
|
|
|
checkPhase = if stdenv.isDarwin then '' |
|
|
|
preCheck = lib.optionalString stdenv.isDarwin '' |
|
|
|
# Tests search for "afplay" binary which is built in to macOS and not available in nixpkgs |
|
|
|
mkdir $TMP/bin |
|
|
|
mkdir $TMP/bin |
|
|
|
ln -s ${coreutils}/bin/true $TMP/bin/afplay |
|
|
|
ln -s ${coreutils}/bin/true $TMP/bin/afplay |
|
|
|
export PATH="$TMP/bin:$PATH" |
|
|
|
PATH="$TMP/bin:$PATH" pytest |
|
|
|
|
|
|
|
'' else if stdenv.isLinux then '' |
|
|
|
|
|
|
|
dbus-run-session \ |
|
|
|
|
|
|
|
--config-file=${dbus.daemon}/share/dbus-1/session.conf \ |
|
|
|
|
|
|
|
pytest |
|
|
|
|
|
|
|
'' else '' |
|
|
|
|
|
|
|
pytest |
|
|
|
''; |
|
|
|
''; |
|
|
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "notifypy" ]; |
|
|
|
pythonImportsCheck = [ "notifypy" ]; |
|
|
|