sourcehut.todosrht: 0.67.2 -> 0.71.0
This commit is contained in:
parent
1722530759
commit
876f3a8bf0
@ -1368,6 +1368,11 @@ in
|
|||||||
inherit configIniOfService;
|
inherit configIniOfService;
|
||||||
port = 5003;
|
port = 5003;
|
||||||
webhooks = true;
|
webhooks = true;
|
||||||
|
extraServices.todosrht-api = {
|
||||||
|
serviceConfig.Restart = "always";
|
||||||
|
serviceConfig.RestartSec = "2s";
|
||||||
|
serviceConfig.ExecStart = "${pkgs.sourcehut.todosrht}/bin/todosrht-api -b ${cfg.listenAddress}:${toString (cfg.todo.port + 100)}";
|
||||||
|
};
|
||||||
extraServices.todosrht-lmtp = {
|
extraServices.todosrht-lmtp = {
|
||||||
wants = [ "postfix.service" ];
|
wants = [ "postfix.service" ];
|
||||||
unitConfig.JoinsNamespaceOf = optional cfg.postfix.enable "postfix.service";
|
unitConfig.JoinsNamespaceOf = optional cfg.postfix.enable "postfix.service";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchFromSourcehut
|
, fetchFromSourcehut
|
||||||
|
, buildGoModule
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, srht
|
, srht
|
||||||
, redis
|
, redis
|
||||||
@ -8,23 +9,36 @@
|
|||||||
, pytest
|
, pytest
|
||||||
, factory_boy
|
, factory_boy
|
||||||
, python
|
, python
|
||||||
|
, unzip
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "todosrht";
|
pname = "todosrht";
|
||||||
version = "0.67.2";
|
version = "0.71.0";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
repo = "todo.sr.ht";
|
repo = "todo.sr.ht";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-/QHsMlhzyah85ubZyx8j4GDUoITuWcLDJKosbZGeOZU=";
|
sha256 = "sha256-IIZKN006UIrdcxF+LYkUtc97QoCnWqzX8036vMctWHY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Revert change breaking Unix socket support for Redis
|
# Revert change breaking Unix socket support for Redis
|
||||||
patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch
|
patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch
|
||||||
];
|
];
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace "all: api" ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
todosrht-api = buildGoModule ({
|
||||||
|
inherit src version;
|
||||||
|
pname = "todosrht-api";
|
||||||
|
modRoot = "api";
|
||||||
|
vendorSha256 = "sha256-ttGT7lUh8O+9KvbaEGWUsthefXQ2ATeli0tnlXCjZFk=";
|
||||||
|
} // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
|
||||||
|
|
||||||
nativeBuildInputs = srht.nativeBuildInputs;
|
nativeBuildInputs = srht.nativeBuildInputs;
|
||||||
|
|
||||||
@ -40,6 +54,10 @@ buildPythonPackage rec {
|
|||||||
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
ln -s ${todosrht-api}/bin/api $out/bin/todosrht-api
|
||||||
|
'';
|
||||||
|
|
||||||
# pytest tests fail
|
# pytest tests fail
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest
|
pytest
|
||||||
|
Loading…
Reference in New Issue
Block a user