heisenbridge: relax mautrix constraint, enable tests
And migrate to buildPythonApplication, as heisenbridge is not a library.
This commit is contained in:
parent
90bb5d0e19
commit
c6aad1b6d3
1 changed files with 18 additions and 7 deletions
|
@ -1,16 +1,23 @@
|
|||
{ lib, fetchurl, python3Packages }:
|
||||
{ lib, fetchFromGitHub, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "heisenbridge";
|
||||
version = "1.6.0";
|
||||
|
||||
# Use the release tarball because it has the version set correctly using the
|
||||
# version.txt file.
|
||||
src = fetchurl {
|
||||
url = "https://github.com/hifi/heisenbridge/releases/download/v${version}/heisenbridge-${version}.tar.gz";
|
||||
sha256 = "sha256-NhHMReY48lg1FhJlCRjRiSpy+9bDLtIV+j+zX8GZcL4=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hifi";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Q7xqKjAUBHh87VAgsgDOCPDINDh0yUdr3UoUlLqJr5k=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
echo "${version}" > heisenbridge/version.txt
|
||||
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "mautrix >=0.10.5, <0.11" "mautrix >=0.10.5, <0.12"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
aiohttp
|
||||
irc
|
||||
|
@ -19,6 +26,10 @@ python3Packages.buildPythonPackage rec {
|
|||
pyyaml
|
||||
];
|
||||
|
||||
checkInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A bouncer-style Matrix-IRC bridge.";
|
||||
homepage = "https://github.com/hifi/heisenbridge";
|
||||
|
|
Loading…
Reference in a new issue