nixpkgs/pkgs/applications/version-management/sourcehut/todo.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.4 KiB
Nix
Raw Normal View History

2021-04-18 03:10:35 +00:00
{ lib
, fetchFromSourcehut
2022-05-05 22:09:09 +00:00
, buildGoModule
2021-04-18 03:10:35 +00:00
, buildPythonPackage
, srht
, alembic
, pytest
, factory-boy
2021-04-18 03:10:35 +00:00
, python
2022-05-05 22:09:09 +00:00
, unzip
, pythonOlder
, setuptools
2021-04-18 03:10:35 +00:00
}:
buildPythonPackage rec {
pname = "todosrht";
version = "0.74.6";
pyproject = true;
disabled = pythonOlder "3.7";
2021-04-18 03:10:35 +00:00
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "todo.sr.ht";
rev = version;
sha256 = "sha256-j12pCGfKf6+9R8NOBIrH2V4OuSMuncU6S1AMWFVoHts=";
};
2022-05-05 22:09:09 +00:00
postPatch = ''
substituteInPlace Makefile \
--replace "all: api" ""
'';
todosrht-api = buildGoModule ({
inherit src version;
pname = "todosrht-api";
modRoot = "api";
vendorHash = "sha256-rvfG5F6ez8UM0dYVhKfzwtb7ZEJlaKMBAfKDbo3Aofc=";
2022-10-30 21:03:19 +00:00
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
srht
alembic
];
preBuild = ''
export PKGVER=${version}
2021-04-18 03:10:35 +00:00
export SRHT_PATH=${srht}/${python.sitePackages}/srht
'';
2022-05-05 22:09:09 +00:00
postInstall = ''
ln -s ${todosrht-api}/bin/api $out/bin/todosrht-api
'';
2019-12-30 01:04:16 +00:00
# pytest tests fail
nativeCheckInputs = [
2019-10-05 15:00:49 +00:00
pytest
factory-boy
2019-10-05 15:00:49 +00:00
];
2019-12-30 01:04:16 +00:00
dontUseSetuptoolsCheck = true;
2021-08-15 21:11:47 +00:00
pythonImportsCheck = [ "todosrht" ];
meta = with lib; {
homepage = "https://todo.sr.ht/~sircmpwn/todo.sr.ht";
description = "Ticket tracking service for the sr.ht network";
2021-08-15 20:54:11 +00:00
license = licenses.agpl3Only;
maintainers = with maintainers; [ eadwu ];
};
}